diff --git a/restagent/restagent.go b/restagent/restagent.go index 26be20e..89e95e4 100644 --- a/restagent/restagent.go +++ b/restagent/restagent.go @@ -5,6 +5,7 @@ import ( "crypto/x509" "fmt" "net/http" + _ "net/http/pprof" "os" "strconv" "strings" @@ -186,6 +187,11 @@ func main() { uriGroup.Use(libSession.SessionHeader()) uriGroup.Any("/*any", gin.WrapH(routes.NewRouter())) + // 注册 pprof 路由 + go func() { + http.ListenAndServe("0.0.0.0:6060", nil) + }() + // 开启监控采集 // monitor.StartMonitor(false, "")