Slide 23
Slide 23 text
Code Quality:
Runtime
Want to use custom URLs instead of debug/pprof?
r := mux.NewRouter()
r.HandleFunc("/my-prefix/pprof", pprof.Index)
r.HandleFunc("/my-prefix/cmdline", pprof.Cmdline)
r.HandleFunc("/my-prefix/profile", pprof.Profile)
r.HandleFunc("/my-prefix/symbol", pprof.Symbol)
r.HandleFunc("/my-prefix/trace", pprof.Trace)
r.Handle(
"/my-prefix/goroutine", pprof.Handler("goroutine"),
)
r.Handle(
"/my-prefix/heap", pprof.Handler("heap"),
)
r.Handle(
"/my-prefix/threadcreate",
pprof.Handler("threadcreate"),
)
r.Handle("/my-prefix/block",pprof.Handler("block"))