Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is this need lib ? #1

Open
ZhiqinYang opened this issue Jan 30, 2018 · 2 comments
Open

is this need lib ? #1

ZhiqinYang opened this issue Jan 30, 2018 · 2 comments

Comments

@ZhiqinYang
Copy link

ZhiqinYang commented Jan 30, 2018

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

@Antonboom
Copy link

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

@yuucu
Copy link

yuucu commented Sep 18, 2023

Repository owner deleted a comment Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@ZhiqinYang @Antonboom @yuucu and others