From 7edad64f93f8b8eb988639da9cec31b9193f9eef Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Fri, 12 Jan 2024 16:10:51 +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 | 6 ++++++ 1 file changed, 6 insertions(+) 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, "")