feat: 分析工具pprof

This commit is contained in:
TsMask committed 2024-01-12 10:25:58 +08:00
1 parent fd56dda836
commit 3f70705c7a
1 file changed
+7
+7
View File
@@ -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, "")