监控优化
This commit is contained in:
parent
d326a8c4cf
commit
59a8d692b1
@ -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(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user