forked from TrueCloudLab/frostfs-node
[#1462] node: Add off-cpu profiler
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
5bcf81d1cc
commit
d19ab43500
3 changed files with 22 additions and 0 deletions
|
@ -3,8 +3,14 @@ package httputil
|
|||
import (
|
||||
"net/http"
|
||||
"net/http/pprof"
|
||||
|
||||
"github.com/felixge/fgprof"
|
||||
)
|
||||
|
||||
func init() {
|
||||
http.DefaultServeMux.Handle("/debug/fgprof", fgprof.Handler())
|
||||
}
|
||||
|
||||
// initializes pprof package in order to
|
||||
// register Prometheus handlers on http.DefaultServeMux.
|
||||
var _ = pprof.Handler("")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue