diff --git a/pprof.go b/pprof.go index 97b6424..ef5457a 100644 --- a/pprof.go +++ b/pprof.go @@ -4,10 +4,16 @@ import ( "net/http/pprof" rtp "runtime/pprof" + "github.com/fasthttp/router" "github.com/valyala/fasthttp" "github.com/valyala/fasthttp/fasthttpadaptor" ) +func attachProfiler(r *router.Router) { + r.GET("/debug/pprof/", pprofHandler()) + r.GET("/debug/pprof/:name", pprofHandler()) +} + func pprofHandler() fasthttp.RequestHandler { items := rtp.Profiles()