新增性能分析器

This commit is contained in:
duanhf2012
2020-04-02 15:25:25 +08:00
parent 269a999b58
commit 9e128759f6
9 changed files with 262 additions and 10 deletions

View File

@@ -92,6 +92,8 @@ func (slf *Module4) OnRelease() {
}
func (slf *TestServiceCall) OnInit() error {
slf.OpenProfiler()
//slf.AfterFunc(time.Second*1,slf.Run)
slf.AfterFunc(time.Second*1,slf.Test)
moduleid1,_ = slf.AddModule(&Module1{})
@@ -182,6 +184,7 @@ func (slf *TestService1) RPC_Test(a *Param,b *Param) error {
}
func (slf *TestService1) OnInit() error {
slf.OpenProfiler()
return nil
}
/*
@@ -213,6 +216,7 @@ func (slf *TestServiceCall) TestDB() {
}
func (slf *TestService2) OnInit() error {
slf.OpenProfiler()
return nil
}
@@ -221,6 +225,7 @@ func main(){
gateService := &GateService.GateService{}
tcpService.SetEventReciver(gateService)
node.Setup(tcpService,gateService)
node.OpenProfilerReport(time.Second*10)
node.Start()
}