diff --git a/comm/gameconfig.go b/comm/gameconfig.go index eb355b16e..13824409c 100644 --- a/comm/gameconfig.go +++ b/comm/gameconfig.go @@ -21,7 +21,7 @@ type GameConfig struct { BattleOpen bool //是否启用战斗 BattleAddr string //战斗服地址 PprofOpen bool //是否启动性能监控 - PprofAddr string //性能监控查看端口 + PprofPort int //性能监控查看端口 } //区服db配置 diff --git a/services/cmd/main.go b/services/cmd/main.go index 5625bb96a..2a3e7be10 100644 --- a/services/cmd/main.go +++ b/services/cmd/main.go @@ -466,7 +466,6 @@ func convertServiceSttings(config *comm.GameConfig, id int, stype string, ip str "MaxAgeTime": 7, } } - sseting.Sys["configure"] = map[string]interface{}{ "ConfigurePath": "./json", "TimestampFile": "./timestamp.text", @@ -485,6 +484,10 @@ func convertServiceSttings(config *comm.GameConfig, id int, stype string, ip str "MongodbDatabase": config.LoaclDB.MongodbDatabase, "CrossConfig": crosspath, } + sseting.Sys["pprof"] = map[string]interface{}{ + "IsOpen": config.PprofOpen, + "ListenPort": config.PprofPort, + } return }