1
This commit is contained in:
parent
76e18cac7b
commit
66f985f758
@ -34,7 +34,7 @@ func RegisterHandlerRPC(param []interface{}) {
|
|||||||
handler(&msg.AdminReq{}, HandleAdminReq)
|
handler(&msg.AdminReq{}, HandleAdminReq)
|
||||||
}
|
}
|
||||||
|
|
||||||
func Init() {
|
func init() {
|
||||||
register()
|
register()
|
||||||
db.InitDB()
|
db.InitDB()
|
||||||
db.InitRedis()
|
db.InitRedis()
|
||||||
|
|||||||
@ -29,7 +29,6 @@ func main() {
|
|||||||
// 当内存>512M时开始GC
|
// 当内存>512M时开始GC
|
||||||
debug.SetGCPercent(50)
|
debug.SetGCPercent(50)
|
||||||
debug.SetMemoryLimit(512 << 20)
|
debug.SetMemoryLimit(512 << 20)
|
||||||
game.Init()
|
|
||||||
// 启动 pprof(仅绑定本地)
|
// 启动 pprof(仅绑定本地)
|
||||||
go func() {
|
go func() {
|
||||||
// 如果需要绑定所有接口改为 ":6060"
|
// 如果需要绑定所有接口改为 ":6060"
|
||||||
|
|||||||
@ -113,7 +113,6 @@ func TestLevelUp(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestEndless(t *testing.T) {
|
func TestEndless(t *testing.T) {
|
||||||
game.Init()
|
|
||||||
p1 := new(game.Player)
|
p1 := new(game.Player)
|
||||||
p1.InitPlayer("3625212")
|
p1.InitPlayer("3625212")
|
||||||
p1.ZeroUpdate(nil)
|
p1.ZeroUpdate(nil)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user