Skip to content

Commit 8433373

Browse files
ethanalee-workgopherbot
authored andcommitted
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 <[email protected]> kokoro-CI: kokoro <[email protected]> Reviewed-by: Robert Findley <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent 5b1d3fa commit 8433373

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/frontend/server.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,10 @@ func (s *Server) installDebugHandlers(handle func(string, http.Handler)) {
257257
handle("/_debug/pprof/profile", ifDebug(hpprof.Profile))
258258
handle("/_debug/pprof/symbol", ifDebug(hpprof.Symbol))
259259
handle("/_debug/pprof/trace", ifDebug(hpprof.Trace))
260+
handle("/_debug/pprof/heap", ifDebug(hpprof.Handler("heap").ServeHTTP))
261+
handle("/_debug/pprof/allocs", ifDebug(hpprof.Handler("allocs").ServeHTTP))
262+
handle("/_debug/pprof/block", ifDebug(hpprof.Handler("block").ServeHTTP))
263+
handle("/_debug/pprof/goroutine", ifDebug(hpprof.Handler("goroutine").ServeHTTP))
260264

261265
handle("/_debug/info", ifDebug(func(w http.ResponseWriter, _ *http.Request) {
262266
row := func(a, b string) {

0 commit comments

Comments
 (0)