Compare commits

...

1 Commits

Author SHA1 Message Date
tx7do
ce77bd094d feat: rest pprof. 2024-11-19 17:29:27 +08:00
2 changed files with 12 additions and 11 deletions

View File

@@ -104,15 +104,16 @@ func initRestConfig(cfg *conf.Bootstrap, mds ...middleware.Middleware) []kratosR
func registerHttpPprof(s *kratosRest.Server) {
s.HandleFunc("/debug/pprof", pprof.Index)
s.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline)
s.HandleFunc("/debug/pprof/profile", pprof.Profile)
s.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
s.HandleFunc("/debug/pprof/trace", pprof.Trace)
s.HandleFunc("/debug/pprof/allocs", pprof.Handler("allocs").ServeHTTP)
s.HandleFunc("/debug/pprof/block", pprof.Handler("block").ServeHTTP)
s.HandleFunc("/debug/pprof/goroutine", pprof.Handler("goroutine").ServeHTTP)
s.HandleFunc("/debug/pprof/heap", pprof.Handler("heap").ServeHTTP)
s.HandleFunc("/debug/pprof/mutex", pprof.Handler("mutex").ServeHTTP)
s.HandleFunc("/debug/pprof/threadcreate", pprof.Handler("threadcreate").ServeHTTP)
s.HandleFunc("/debug/cmdline", pprof.Cmdline)
s.HandleFunc("/debug/profile", pprof.Profile)
s.HandleFunc("/debug/symbol", pprof.Symbol)
s.HandleFunc("/debug/trace", pprof.Trace)
s.HandleFunc("/debug/allocs", pprof.Handler("allocs").ServeHTTP)
s.HandleFunc("/debug/block", pprof.Handler("block").ServeHTTP)
s.HandleFunc("/debug/goroutine", pprof.Handler("goroutine").ServeHTTP)
s.HandleFunc("/debug/heap", pprof.Handler("heap").ServeHTTP)
s.HandleFunc("/debug/mutex", pprof.Handler("mutex").ServeHTTP)
s.HandleFunc("/debug/threadcreate", pprof.Handler("threadcreate").ServeHTTP)
}

View File

@@ -7,7 +7,7 @@ git tag oss/minio/v0.0.8 --force
git tag registry/v0.0.8 --force
git tag config/v0.0.8 --force
git tag logger/v0.0.8 --force
git tag rpc/v0.0.8 --force
git tag rpc/v0.0.9 --force
git tag tracer/v0.0.8 --force
git tag database/ent/v0.0.8 --force