gin 框架下单纯的使用, "net/http/pprof", 发现 404 page not found, 那是因为在gin框架下, 需要使用 "github.com/gin-contrib/pprof",
具体如下:
engine := gin.Default()
//性能监控
pprof.Register(engine, "dev/pprof")
这样就能使用了
gin 框架下单纯的使用, "net/http/pprof", 发现 404 page not found, 那是因为在gin框架下, 需要使用 "github.com/gin-contrib/pprof",
具体如下:
engine := gin.Default()
//性能监控
pprof.Register(engine, "dev/pprof")
这样就能使用了