监控优化

This commit is contained in:
hahwu 2025-12-30 16:45:37 +08:00
parent d326a8c4cf
commit 59a8d692b1

View File

@ -1,6 +1,7 @@
package main
import (
"fmt"
"net/http"
_ "net/http/pprof"
"runtime/debug"
@ -27,7 +28,8 @@ func main() {
// 启动 pprof仅绑定本地
go func() {
// 如果需要绑定所有接口改为 ":6060"
_ = http.ListenAndServe("127.0.0.1:6060", nil)
port := 6060 + conf.Server.ServerID
_ = http.ListenAndServe(fmt.Sprintf("127.0.0.1:%d", port), nil)
}()
leaf.Run(