Skip to content

Commit

Permalink
Call functions to enable block/mutex pprof profiles.
Browse files Browse the repository at this point in the history
  • Loading branch information
timoreimann authored and traefiker committed Jul 6, 2018
1 parent 689f120 commit 0c0ecc1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0c0ecc1

Please sign in to comment.