We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 400aa2d commit 38eadedCopy full SHA for 38eaded
web.go
@@ -7,6 +7,7 @@ import (
7
"encoding/base64"
8
"fmt"
9
"http"
10
+ "http/pprof"
11
"io/ioutil"
12
"log"
13
"mime"
@@ -442,7 +443,13 @@ func (s *Server) Run(addr string) {
442
443
s.initServer()
444
445
mux := http.NewServeMux()
446
+
447
+ mux.Handle("/debug/pprof/cmdline", http.HandlerFunc(pprof.Cmdline))
448
+ mux.Handle("/debug/pprof/profile", http.HandlerFunc(pprof.Profile))
449
+ mux.Handle("/debug/pprof/heap", http.HandlerFunc(pprof.Heap))
450
+ mux.Handle("/debug/pprof/symbol", http.HandlerFunc(pprof.Symbol))
451
mux.Handle("/", s)
452
453
s.Logger.Printf("web.go serving %s\n", addr)
454
455
l, err := net.Listen("tcp", addr)
0 commit comments