Add cpu profiling
This commit is contained in:
parent
c620e4a005
commit
ec6eb3c814
1
main.go
1
main.go
@ -106,6 +106,7 @@ func main() {
|
|||||||
if cfg.Profiling {
|
if cfg.Profiling {
|
||||||
logger.Info("Profiling enabled, exposing /debug/pprof")
|
logger.Info("Profiling enabled, exposing /debug/pprof")
|
||||||
mux.HandleFunc("/debug/pprof/", pprof.Index)
|
mux.HandleFunc("/debug/pprof/", pprof.Index)
|
||||||
|
mux.HandleFunc("/debug/pprof/profile", pprof.Profile)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start http server
|
// Start http server
|
||||||
|
Loading…
x
Reference in New Issue
Block a user