echo-pprof
echo-pprof copied to clipboard
is this need lib ?
i found that this package is no need, because has a simple way do this ! like follow
_ "net/http/pprof"
func main() { // Echo instance e := echo.New() // Routes e.POST("/", hello) e.GET("/debug/pprof/*", echo.WrapHandler(http.DefaultServeMux)) e.StartServer(&http.Server{Addr: "0.0.0.0:6060"}) }
Or
pprofMux := http.NewServeMux()
pprofMux.HandleFunc("/debug/pprof/", pprof.Index)
pprofMux.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline)
pprofMux.HandleFunc("/debug/pprof/profile", pprof.Profile)
pprofMux.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
pprofMux.HandleFunc("/debug/pprof/trace", pprof.Trace)
e.GET("/debug/pprof/*", echo.WrapHandler(pprofMux))
OR
https://github.com/labstack/echo-contrib/tree/master/pprof