diff --git a/restagent/restagent.go b/restagent/restagent.go index d18445f..502e736 100644 --- a/restagent/restagent.go +++ b/restagent/restagent.go @@ -9,6 +9,8 @@ import ( "strconv" "strings" + _ "net/http/pprof" + "ems.agt/features/dbrest" "ems.agt/features/fm" "ems.agt/features/lm" @@ -185,6 +187,11 @@ func main() { uriGroup.Use(libSession.SessionHeader()) uriGroup.Any("/*any", gin.WrapH(routes.NewRouter())) + // 注册 pprof 路由 + go func() { + http.ListenAndServe("localhost:6060", nil) + }() + // 开启监控采集 // monitor.StartMonitor(false, "")