mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-13 06:07:34 +00:00
tsweb: restore CPU profiling handler
It was accidentally deleted in the earlier 0022c3d2e
(#2143) refactor.
Lock it in with a test.
Fixes tailscale/corp#2503
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
daf54d1253
commit
722942dd46
@@ -47,6 +47,11 @@ func Debugger(mux *http.ServeMux) *DebugHandler {
|
||||
}
|
||||
mux.Handle("/debug/", ret)
|
||||
|
||||
// Register this one directly on mux, rather than using
|
||||
// ret.URL/etc, as we don't need another line of output on the
|
||||
// index page. The /pprof/ index already covers it.
|
||||
mux.Handle("/debug/pprof/profile", http.HandlerFunc(pprof.Profile))
|
||||
|
||||
ret.KVFunc("Uptime", func() interface{} { return Uptime() })
|
||||
ret.KV("Version", version.Long)
|
||||
ret.Handle("vars", "Metrics (Go)", expvar.Handler())
|
||||
|
Reference in New Issue
Block a user