From 0f9525eecb44e0c6b8480bc257ce3b6c0946fe17 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 14 Sep 2023 15:39:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=8D=95=E7=BE=8A=E5=9F=8B?= =?UTF-8?q?=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 1 + modules/capturesheep/api_changemts.go | 4 ++++ modules/robot/statisticalcomp.go | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/comm/const.go b/comm/const.go index c627175ae..220736957 100644 --- a/comm/const.go +++ b/comm/const.go @@ -900,6 +900,7 @@ const ( Rtype230 TaskType = 230 // 星期几登录 Rtype231 TaskType = 231 // 每期循环塔达到x层 Rtype232 TaskType = 232 // 种族塔通关x阵营x层 + Rtype234 TaskType = 234 // 完成多次捕羊大赛 ) const ( MailLineEasy int32 = 1 // 简单 diff --git a/modules/capturesheep/api_changemts.go b/modules/capturesheep/api_changemts.go index c08dd2164..e5db16878 100644 --- a/modules/capturesheep/api_changemts.go +++ b/modules/capturesheep/api_changemts.go @@ -48,5 +48,9 @@ func (this *apiComp) ChangeMts(session comm.IUserSession, req *pb.CapturesheepCh return } session.SendMsg(string(this.module.GetType()), "changemts", &pb.CapturesheepChangeMtsResp{Mid: req.Mid}) + + go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { + this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype234, 1)) + }) return } diff --git a/modules/robot/statisticalcomp.go b/modules/robot/statisticalcomp.go index c8b08b5ea..fa2fca4ee 100644 --- a/modules/robot/statisticalcomp.go +++ b/modules/robot/statisticalcomp.go @@ -85,7 +85,7 @@ func (this *statisticalComp) OutReport() { file.WriteString(fmt.Sprintf("机器人总数: %d\n", this.module.options.RobotTotalNum)) file.WriteString(fmt.Sprintf("成功数量: %d\n", this.succclientNum)) file.WriteString(fmt.Sprintf("失败数量: %d\n", this.failclientNum)) - file.WriteString(fmt.Sprintf("压测执行时长: %f秒\n", this.end.Sub(this.start).Seconds())) + file.WriteString(fmt.Sprintf("压测执行时长: %.2f秒\n", this.end.Sub(this.start).Seconds())) file.WriteString(fmt.Sprintf("消息总请求数: %d\n", totalmessage)) file.WriteString("---消息压测详情----------------------------------------------------------------------------------------------------\n") for message, data := range messages {