echo-pprof icon indicating copy to clipboard operation
echo-pprof copied to clipboard

is this need lib ?

Open ZhiqinYang opened this issue 8 years ago • 2 comments

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"}) }

ZhiqinYang avatar Jan 30 '18 14:01 ZhiqinYang

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))

Antonboom avatar Jul 15 '22 07:07 Antonboom

OR

https://github.com/labstack/echo-contrib/tree/master/pprof

yuucu avatar Sep 18 '23 11:09 yuucu