上传编译代码
This commit is contained in:
parent
ef8cecd870
commit
9000fc18dd
@ -7,3 +7,4 @@ go build -o ./bin/cmd.exe ./services/cmd/main.go
|
|||||||
go build -o ./bin/mainte.exe ./services/mainte/main.go
|
go build -o ./bin/mainte.exe ./services/mainte/main.go
|
||||||
go build -o ./bin/gateway.exe ./services/gateway/main.go
|
go build -o ./bin/gateway.exe ./services/gateway/main.go
|
||||||
go build -o ./bin/worker.exe ./services/worker/main.go
|
go build -o ./bin/worker.exe ./services/worker/main.go
|
||||||
|
go build -o ./bin/robot.exe ./services/robot/main.go
|
29
bin/robot.txt
Normal file
29
bin/robot.txt
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
机器人总数: 1
|
||||||
|
成功数量: 1
|
||||||
|
失败数量: 0
|
||||||
|
消息总吞吐量: 128
|
||||||
|
---消息压测详情----------------------------------------------------------------------------------------------------
|
||||||
|
消息名:hero.talentlist 请求次数:1 耗时最小:18 ms 耗时最大:18 ms 平均耗时:18.00ms 中位耗时:18.00ms
|
||||||
|
消息名:gm.cmd 请求次数:2 耗时最小:0 ms 耗时最大:29 ms 平均耗时:14.50ms 中位耗时:14.50ms
|
||||||
|
消息名:wtask.info 请求次数:1 耗时最小:40 ms 耗时最大:40 ms 平均耗时:40.00ms 中位耗时:40.00ms
|
||||||
|
消息名:wtask.finish 请求次数:16 耗时最小:34 ms 耗时最大:73 ms 平均耗时:45.38ms 中位耗时:43.00ms
|
||||||
|
消息名:wtask.battlefinish 请求次数:7 耗时最小:18 ms 耗时最大:109 ms 平均耗时:62.29ms 中位耗时:46.00ms
|
||||||
|
消息名:practice.info 请求次数:2 耗时最小:19 ms 耗时最大:30 ms 平均耗时:24.50ms 中位耗时:24.50ms
|
||||||
|
消息名:sys.funcactivate 请求次数:2 耗时最小:16 ms 耗时最大:19 ms 平均耗时:17.50ms 中位耗时:17.50ms
|
||||||
|
消息名:user.create 请求次数:1 耗时最小:87 ms 耗时最大:87 ms 平均耗时:87.00ms 中位耗时:87.00ms
|
||||||
|
消息名:mainline.info 请求次数:13 耗时最小:22 ms 耗时最大:32 ms 平均耗时:24.23ms 中位耗时:24.00ms
|
||||||
|
消息名:mainline.levelpass 请求次数:6 耗时最小:22 ms 耗时最大:25 ms 平均耗时:23.83ms 中位耗时:24.00ms
|
||||||
|
消息名:practice.practice 请求次数:1 耗时最小:24 ms 耗时最大:24 ms 平均耗时:24.00ms 中位耗时:24.00ms
|
||||||
|
消息名:wtask.completecondi 请求次数:3 耗时最小:26 ms 耗时最大:28 ms 平均耗时:27.00ms 中位耗时:27.00ms
|
||||||
|
消息名:chat.send 请求次数:10 耗时最小:14 ms 耗时最大:17 ms 平均耗时:15.70ms 中位耗时:15.50ms
|
||||||
|
消息名:shop.getlist 请求次数:10 耗时最小:16 ms 耗时最大:27 ms 平均耗时:19.50ms 中位耗时:19.00ms
|
||||||
|
消息名:wtask.accept 请求次数:17 耗时最小:23 ms 耗时最大:36 ms 平均耗时:27.47ms 中位耗时:27.00ms
|
||||||
|
消息名:sys.funcgetlist 请求次数:1 耗时最小:62 ms 耗时最大:62 ms 平均耗时:62.00ms 中位耗时:62.00ms
|
||||||
|
消息名:hero.list 请求次数:1 耗时最小:29 ms 耗时最大:29 ms 平均耗时:29.00ms 中位耗时:29.00ms
|
||||||
|
消息名:items.getlist 请求次数:1 耗时最小:23 ms 耗时最大:23 ms 平均耗时:23.00ms 中位耗时:23.00ms
|
||||||
|
消息名:hero.drawcard 请求次数:10 耗时最小:50 ms 耗时最大:75 ms 平均耗时:62.90ms 中位耗时:60.00ms
|
||||||
|
消息名:mainline.challenge 请求次数:7 耗时最小:48 ms 耗时最大:51 ms 平均耗时:49.71ms 中位耗时:50.00ms
|
||||||
|
消息名:mainline.challengeover 请求次数:7 耗时最小:82 ms 耗时最大:166 ms 平均耗时:128.86ms 中位耗时:152.00ms
|
||||||
|
消息名:user.login 请求次数:1 耗时最小:764 ms 耗时最大:764 ms 平均耗时:764.00ms 中位耗时:764.00ms
|
||||||
|
消息名:wtask.battlestart 请求次数:7 耗时最小:17 ms 耗时最大:29 ms 平均耗时:23.29ms 中位耗时:23.00ms
|
||||||
|
消息名:equipment.getlist 请求次数:1 耗时最小:19 ms 耗时最大:19 ms 平均耗时:19.00ms 中位耗时:19.00ms
|
@ -84,7 +84,7 @@ func (this *configureComp) GettriggerData(ptypes int32) (result *cfg.GameDreamla
|
|||||||
} else {
|
} else {
|
||||||
if result, ok = v.(*cfg.GameDreamlandTrigger).GetDataMap()[ptypes]; !ok {
|
if result, ok = v.(*cfg.GameDreamlandTrigger).GetDataMap()[ptypes]; !ok {
|
||||||
err = fmt.Errorf("not found:%d ", ptypes)
|
err = fmt.Errorf("not found:%d ", ptypes)
|
||||||
this.module.Errorln(err)
|
// this.module.Errorln(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package robot
|
package robot
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
"sync"
|
"sync"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
@ -88,6 +89,7 @@ locp:
|
|||||||
}
|
}
|
||||||
func (this *Client) WriteMsg(msg *pb.UserMessage) (err error) {
|
func (this *Client) WriteMsg(msg *pb.UserMessage) (err error) {
|
||||||
if atomic.LoadInt32(&this.state) != 1 {
|
if atomic.LoadInt32(&this.state) != 1 {
|
||||||
|
err = fmt.Errorf("Client state closed !")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
var (
|
var (
|
||||||
|
@ -32,7 +32,7 @@ type Robot struct {
|
|||||||
await chan *MessageResp
|
await chan *MessageResp
|
||||||
modules map[core.M_Modules]IModuleRobot
|
modules map[core.M_Modules]IModuleRobot
|
||||||
cycle bool
|
cycle bool
|
||||||
pipeline []Pipeline //执行流水线
|
pipeline []*Pipeline //执行流水线
|
||||||
statistics []*RobotStatistics
|
statistics []*RobotStatistics
|
||||||
wtaskerror error
|
wtaskerror error
|
||||||
}
|
}
|
||||||
@ -248,6 +248,7 @@ func (this *Robot) run() {
|
|||||||
module IModuleRobot
|
module IModuleRobot
|
||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
|
|
||||||
for this.cycle {
|
for this.cycle {
|
||||||
this.cycle = false
|
this.cycle = false
|
||||||
for _, v := range this.pipeline {
|
for _, v := range this.pipeline {
|
||||||
|
@ -66,8 +66,17 @@ func (this *robotmgrComp) createRobot(index int32) {
|
|||||||
account: fmt.Sprintf("%s_%d", this.module.options.RobotName, this.module.options.RobotStart+index),
|
account: fmt.Sprintf("%s_%d", this.module.options.RobotName, this.module.options.RobotStart+index),
|
||||||
serverId: this.module.options.ServerID,
|
serverId: this.module.options.ServerID,
|
||||||
cycle: true,
|
cycle: true,
|
||||||
pipeline: this.module.options.Pipeline,
|
pipeline: make([]*Pipeline, 0),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for _, v := range this.module.options.Pipeline {
|
||||||
|
robot.pipeline = append(robot.pipeline, &Pipeline{
|
||||||
|
Module: v.Module,
|
||||||
|
Exenum: v.Exenum,
|
||||||
|
ErrNotStop: v.ErrNotStop,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
if err = robot.Init(this.module.options.ServerAddr, robot); err != nil {
|
if err = robot.Init(this.module.options.ServerAddr, robot); err != nil {
|
||||||
this.module.statisticalComp.AddFailClient(robot, err)
|
this.module.statisticalComp.AddFailClient(robot, err)
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user