feat: 分析工具pprof
This commit is contained in:
@@ -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, "")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user