feat: 分析工具pprof
This commit is contained in:
@@ -9,6 +9,8 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
_ "net/http/pprof"
|
||||||
|
|
||||||
"ems.agt/features/dbrest"
|
"ems.agt/features/dbrest"
|
||||||
"ems.agt/features/fm"
|
"ems.agt/features/fm"
|
||||||
"ems.agt/features/lm"
|
"ems.agt/features/lm"
|
||||||
@@ -185,6 +187,11 @@ func main() {
|
|||||||
uriGroup.Use(libSession.SessionHeader())
|
uriGroup.Use(libSession.SessionHeader())
|
||||||
uriGroup.Any("/*any", gin.WrapH(routes.NewRouter()))
|
uriGroup.Any("/*any", gin.WrapH(routes.NewRouter()))
|
||||||
|
|
||||||
|
// 注册 pprof 路由
|
||||||
|
go func() {
|
||||||
|
http.ListenAndServe("localhost:6060", nil)
|
||||||
|
}()
|
||||||
|
|
||||||
// 开启监控采集
|
// 开启监控采集
|
||||||
// monitor.StartMonitor(false, "")
|
// monitor.StartMonitor(false, "")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user