From 3f70705c7a3708c324037a9e4f840fa9f0a99f32 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Fri, 12 Jan 2024 10:25:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=86=E6=9E=90=E5=B7=A5=E5=85=B7ppr?= =?UTF-8?q?of?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- restagent/restagent.go | 7 +++++++ 1 file changed, 7 insertions(+) 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, "")