Call functions to enable block/mutex pprof profiles.
This commit is contained in:
parent
689f120410
commit
0c0ecc1cdc
1 changed files with 2 additions and 0 deletions
|
@ -38,6 +38,8 @@ func (g DebugHandler) AddRoutes(router *mux.Router) {
|
|||
fmt.Fprint(w, "\n}\n")
|
||||
})
|
||||
|
||||
runtime.SetBlockProfileRate(1)
|
||||
runtime.SetMutexProfileFraction(5)
|
||||
router.Methods(http.MethodGet).PathPrefix("/debug/pprof/cmdline").HandlerFunc(pprof.Cmdline)
|
||||
router.Methods(http.MethodGet).PathPrefix("/debug/pprof/profile").HandlerFunc(pprof.Profile)
|
||||
router.Methods(http.MethodGet).PathPrefix("/debug/pprof/symbol").HandlerFunc(pprof.Symbol)
|
||||
|
|
Loading…
Add table
Reference in a new issue