上传gm命令
This commit is contained in:
parent
0f9525eecb
commit
e41c99ae84
45
bin/压力测试报告003.txt
Normal file
45
bin/压力测试报告003.txt
Normal file
@ -0,0 +1,45 @@
|
||||
机器人总数: 3000
|
||||
成功数量: 2998
|
||||
失败数量: 1
|
||||
压测执行时长: 801.77秒
|
||||
消息总请求数: 617008
|
||||
---消息压测详情----------------------------------------------------------------------------------------------------
|
||||
消息名:mainline.info 请求次数:2925 耗时最小:14 ms 耗时最大:1517 ms 平均耗时:30.21ms 中位耗时:20.00ms
|
||||
消息名:arena.info 请求次数:2925 耗时最小:13 ms 耗时最大:1561 ms 平均耗时:31.81ms 中位耗时:19.00ms
|
||||
消息名:equipment.upgrade 请求次数:29245 耗时最小:15 ms 耗时最大:14774ms 平均耗时:85.79ms 中位耗时:23.00ms
|
||||
消息名:wtask.accept 请求次数:23399 耗时最小:14 ms 耗时最大:25724ms 平均耗时:42.01ms 中位耗时:20.00ms
|
||||
消息名:caravan.gotocity 请求次数:29245 耗时最小:16 ms 耗时最大:55580ms 平均耗时:123.21ms 中位耗时:38.00ms
|
||||
消息名:caravan.buyorsell 请求次数:29245 耗时最小:15 ms 耗时最大:28869ms 平均耗时:98.53ms 中位耗时:37.00ms
|
||||
消息名:items.getlist 请求次数:2925 耗时最小:13 ms 耗时最大:2033 ms 平均耗时:25.68ms 中位耗时:19.00ms
|
||||
消息名:horoscope.info 请求次数:2925 耗时最小:13 ms 耗时最大:4383 ms 平均耗时:32.71ms 中位耗时:18.00ms
|
||||
消息名:wtask.completecondi 请求次数:11681 耗时最小:14 ms 耗时最大:5781 ms 平均耗时:40.86ms 中位耗时:21.00ms
|
||||
消息名:pagoda.challenge 请求次数:29245 耗时最小:14 ms 耗时最大:60541ms 平均耗时:109.65ms 中位耗时:23.00ms
|
||||
消息名:shop.getlist 请求次数:2925 耗时最小:14 ms 耗时最大:1643 ms 平均耗时:33.83ms 中位耗时:21.00ms
|
||||
消息名:pagoda.challengeover 请求次数:29245 耗时最小:20 ms 耗时最大:57145ms 平均耗时:105.81ms 中位耗时:47.00ms
|
||||
消息名:gm.cmd 请求次数:43875 耗时最小:0 ms 耗时最大:3921 ms 平均耗时:25.73ms 中位耗时:20.00ms
|
||||
消息名:caravan.getlist 请求次数:2925 耗时最小:18 ms 耗时最大:31701ms 平均耗时:90.29ms 中位耗时:39.00ms
|
||||
消息名:viking.challengeover 请求次数:29245 耗时最小:21 ms 耗时最大:8923 ms 平均耗时:111.34ms 中位耗时:56.00ms
|
||||
消息名:shop.buy 请求次数:10 耗时最小:20 ms 耗时最大:26 ms 平均耗时:21.50ms 中位耗时:21.00ms
|
||||
消息名:user.create 请求次数:2997 耗时最小:14 ms 耗时最大:758 ms 平均耗时:29.95ms 中位耗时:27.00ms
|
||||
消息名:arena.challenge 请求次数:29245 耗时最小:16 ms 耗时最大:21279ms 平均耗时:106.50ms 中位耗时:27.00ms
|
||||
消息名:chat.send 请求次数:29245 耗时最小:13 ms 耗时最大:28862ms 平均耗时:65.04ms 中位耗时:18.00ms
|
||||
消息名:wtask.battlefinish 请求次数:11676 耗时最小:21 ms 耗时最大:7290 ms 平均耗时:75.68ms 中位耗时:48.00ms
|
||||
消息名:mainline.levelpass 请求次数:20469 耗时最小:14 ms 耗时最大:45331ms 平均耗时:106.17ms 中位耗时:21.00ms
|
||||
消息名:viking.challenge 请求次数:29245 耗时最小:17 ms 耗时最大:14515ms 平均耗时:77.70ms 中位耗时:27.00ms
|
||||
消息名:horoscope.upgrade 请求次数:29245 耗时最小:20 ms 耗时最大:36813ms 平均耗时:184.25ms 中位耗时:68.00ms
|
||||
消息名:wtask.info 请求次数:2925 耗时最小:14 ms 耗时最大:1331 ms 平均耗时:27.87ms 中位耗时:21.00ms
|
||||
消息名:hero.drawcard 请求次数:29245 耗时最小:49 ms 耗时最大:15147ms 平均耗时:254.17ms 中位耗时:114.00ms
|
||||
消息名:wtask.finish 请求次数:20438 耗时最小:15 ms 耗时最大:29185ms 平均耗时:60.30ms 中位耗时:23.00ms
|
||||
消息名:wtask.battlestart 请求次数:11676 耗时最小:14 ms 耗时最大:9499 ms 平均耗时:51.64ms 中位耗时:21.00ms
|
||||
消息名:mainline.challenge 请求次数:8776 耗时最小:17 ms 耗时最大:28383ms 平均耗时:123.65ms 中位耗时:28.00ms
|
||||
消息名:mainline.challengeover 请求次数:8776 耗时最小:21 ms 耗时最大:17587ms 平均耗时:116.84ms 中位耗时:50.00ms
|
||||
消息名:caravan.getstory 请求次数:5707 耗时最小:14 ms 耗时最大:56751ms 平均耗时:99.17ms 中位耗时:22.00ms
|
||||
消息名:user.login 请求次数:2998 耗时最小:16 ms 耗时最大:1251 ms 平均耗时:525.18ms 中位耗时:529.00ms
|
||||
消息名:hero.talentlist 请求次数:2925 耗时最小:13 ms 耗时最大:899 ms 平均耗时:21.63ms 中位耗时:18.00ms
|
||||
消息名:pagoda.getlist 请求次数:2925 耗时最小:14 ms 耗时最大:1685 ms 平均耗时:29.64ms 中位耗时:19.00ms
|
||||
消息名:sys.funcgetlist 请求次数:2925 耗时最小:14 ms 耗时最大:7080 ms 平均耗时:56.43ms 中位耗时:20.00ms
|
||||
消息名:viking.getlist 请求次数:29245 耗时最小:13 ms 耗时最大:20384ms 平均耗时:72.53ms 中位耗时:19.00ms
|
||||
消息名:hero.list 请求次数:2925 耗时最小:14 ms 耗时最大:6236 ms 平均耗时:27.51ms 中位耗时:20.00ms
|
||||
消息名:equipment.getlist 请求次数:2925 耗时最小:13 ms 耗时最大:1181 ms 平均耗时:22.95ms 中位耗时:18.00ms
|
||||
消息名:arena.matche 请求次数:29245 耗时最小:17 ms 耗时最大:57310ms 平均耗时:210.14ms 中位耗时:58.00ms
|
||||
消息名:arena.challengereward 请求次数:29245 耗时最小:17 ms 耗时最大:12707ms 平均耗时:67.21ms 中位耗时:26.00ms
|
@ -608,6 +608,7 @@ type (
|
||||
IGuildgve interface {
|
||||
///红点
|
||||
IGetReddot
|
||||
ModifyBooslv(session IUserSession, lv int32) (errdata *pb.ErrorData)
|
||||
}
|
||||
|
||||
//购物中心
|
||||
|
@ -756,18 +756,18 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
||||
return
|
||||
}
|
||||
|
||||
} else if len(datas) == 2 && (datas[0] == "sociatylv") {
|
||||
} else if len(datas) == 2 && (datas[0] == "sociatybooslv") {
|
||||
var (
|
||||
lv int
|
||||
err error
|
||||
)
|
||||
|
||||
module1, err := this.service.GetModule(comm.ModuleSociaty)
|
||||
module1, err := this.service.GetModule(comm.ModuleGuildGve)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
lv, err = strconv.Atoi(datas[1])
|
||||
if err = module1.(comm.ISociaty).ModifySociatyLv(session.GetUserId(), int32(lv)); err != nil {
|
||||
if errdata = module1.(comm.IGuildgve).ModifyBooslv(session, int32(lv)); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ExternalModule,
|
||||
Title: pb.ChatType_Moonfantasy.String(),
|
||||
|
@ -4,8 +4,10 @@ import (
|
||||
"context"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
)
|
||||
|
||||
func NewModule() core.IModule {
|
||||
@ -109,3 +111,58 @@ func (this *GuildGve) Reddot(session comm.IUserSession, rid ...comm.ReddotType)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (this *GuildGve) ModifyBooslv(session comm.IUserSession, lv int32) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
sociaty *pb.DBSociaty
|
||||
info *pb.DBGuildGve
|
||||
members []*pb.SociatyMemberInfo
|
||||
users []string = make([]string, 0)
|
||||
conf *cfg.GameGuildBossData
|
||||
err error
|
||||
)
|
||||
|
||||
if sociaty = this.ModuleSociaty.GetSociaty(session.GetUserId()); sociaty != nil {
|
||||
return
|
||||
}
|
||||
lock, _ := this.modelGuildGve.userlock(sociaty.Id)
|
||||
err = lock.Lock()
|
||||
if err != nil {
|
||||
this.Error("公会战分布式锁 err!", log.Field{Key: "Unionid", Value: sociaty.Id}, log.Field{Key: "err", Value: err.Error()})
|
||||
return
|
||||
}
|
||||
defer lock.Unlock()
|
||||
if info, err = this.modelGuildGve.getGuildGve(sociaty.Id); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
info.Currstage = lv
|
||||
for _, v := range info.Boos {
|
||||
if conf, err = this.configure.getguildbossByNext(v.Boosid, info.Currstage); err != nil {
|
||||
this.Errorln(err)
|
||||
return
|
||||
}
|
||||
v.Boosid = conf.BossId
|
||||
v.Hp = conf.Hp
|
||||
v.Record = make([]*pb.DBGveRecord, 0)
|
||||
}
|
||||
if err = this.modelGuildGve.updateGuildGve(info); err != nil {
|
||||
this.Errorln(err)
|
||||
return
|
||||
}
|
||||
if members, errdata = this.sociaty.MembersBySociatyId(sociaty.Id); errdata != nil {
|
||||
this.Debug("获取工会成员列表!", log.Field{Key: "errdata", Value: errdata})
|
||||
return
|
||||
}
|
||||
for _, v := range members {
|
||||
users = append(users, v.Uid)
|
||||
}
|
||||
this.SendMsgToUsers(string(this.GetType()), "stagechange", &pb.GuildGveStageChangePush{
|
||||
Info: info,
|
||||
}, users...)
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user