internal/frontend: add additional pprof memory handlers
- Add additional handlers for heap, allocs, blocks and goroutines.
Change-Id: I3c7e46cad6a34aca07f61d6dc3026ac4c1da113f
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/721760
Auto-Submit: Ethan Lee <ethanalee@google.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/internal/frontend/server.go b/internal/frontend/server.go
index a5e5e53..5f621fd 100644
--- a/internal/frontend/server.go
+++ b/internal/frontend/server.go
@@ -257,6 +257,10 @@
handle("/_debug/pprof/profile", ifDebug(hpprof.Profile))
handle("/_debug/pprof/symbol", ifDebug(hpprof.Symbol))
handle("/_debug/pprof/trace", ifDebug(hpprof.Trace))
+ handle("/_debug/pprof/heap", ifDebug(hpprof.Handler("heap").ServeHTTP))
+ handle("/_debug/pprof/allocs", ifDebug(hpprof.Handler("allocs").ServeHTTP))
+ handle("/_debug/pprof/block", ifDebug(hpprof.Handler("block").ServeHTTP))
+ handle("/_debug/pprof/goroutine", ifDebug(hpprof.Handler("goroutine").ServeHTTP))
handle("/_debug/info", ifDebug(func(w http.ResponseWriter, _ *http.Request) {
row := func(a, b string) {