aboutsummaryrefslogtreecommitdiff
path: root/internal/frontend/server.go
diff options
context:
space:
mode:
authorEthan Lee <ethanalee@google.com>2025-11-18 12:14:16 -0500
committerGopher Robot <gobot@golang.org>2025-11-20 12:32:32 -0800
commit84333735ffe124f7bd904805fd488b93841de49f (patch)
tree92ba1a06cb48455d30f151cc19d1325e7b7dc0b4 /internal/frontend/server.go
parent5b1d3fae21499c79de12ba167b6b3b6a02ffa5f5 (diff)
downloadgo-x-pkgsite-84333735ffe124f7bd904805fd488b93841de49f.tar.xz
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>
Diffstat (limited to 'internal/frontend/server.go')
-rw-r--r--internal/frontend/server.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/frontend/server.go b/internal/frontend/server.go
index a5e5e533..5f621fdf 100644
--- a/internal/frontend/server.go
+++ b/internal/frontend/server.go
@@ -257,6 +257,10 @@ func (s *Server) installDebugHandlers(handle func(string, http.Handler)) {
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) {