From ce77bd094dfabb254d2a85ec9fcd4589f3cc0983 Mon Sep 17 00:00:00 2001 From: tx7do Date: Tue, 19 Nov 2024 17:29:27 +0800 Subject: [PATCH] feat: rest pprof. --- rpc/rest.go | 21 +++++++++++---------- tag.bat | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/rpc/rest.go b/rpc/rest.go index 21fa718..e6064e2 100644 --- a/rpc/rest.go +++ b/rpc/rest.go @@ -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) } diff --git a/tag.bat b/tag.bat index f65e693..bf68f9e 100644 --- a/tag.bat +++ b/tag.bat @@ -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