Add cpu profiling
This commit is contained in:
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
|
||||||
|
Reference in New Issue
Block a user