2023-09-13 17:00:24 +00:00
|
|
|
/*
|
|
|
|
Copyright © 2023 Seednode <seednode@seedno.de>
|
|
|
|
*/
|
|
|
|
|
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http/pprof"
|
|
|
|
|
|
|
|
"github.com/julienschmidt/httprouter"
|
|
|
|
)
|
|
|
|
|
|
|
|
func registerProfileHandlers(mux *httprouter.Router) {
|
2023-09-14 04:24:29 +00:00
|
|
|
mux.HandlerFunc("GET", Prefix+"/debug/pprof/", pprof.Index)
|
|
|
|
mux.HandlerFunc("GET", Prefix+"/debug/pprof/cmdline", pprof.Cmdline)
|
|
|
|
mux.HandlerFunc("GET", Prefix+"/debug/pprof/profile", pprof.Profile)
|
|
|
|
mux.HandlerFunc("GET", Prefix+"/debug/pprof/symbol", pprof.Symbol)
|
|
|
|
mux.HandlerFunc("GET", Prefix+"/debug/pprof/trace", pprof.Trace)
|
2023-09-13 17:00:24 +00:00
|
|
|
}
|