From 3c6efe19ba55ae906f5ca5610fe688d71dc0497e Mon Sep 17 00:00:00 2001 From: eson <9673575+githubcontent@user.noreply.gitee.com> Date: Fri, 8 Sep 2023 11:49:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=98=9F=E5=88=97=E5=A0=86?= =?UTF-8?q?=E7=A7=AF=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sm.go | 5 +---- websocket.go | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/sm.go b/sm.go index 22fcb08..651390a 100644 --- a/sm.go +++ b/sm.go @@ -7,7 +7,6 @@ import ( "io" "runtime" "sync" - "time" "github.com/474420502/execute/triggered" sm "github.com/lni/dragonboat/v4/statemachine" @@ -44,9 +43,7 @@ func NewSMQueue(shardID uint64, replicaID uint64) sm.IStateMachine { allocMB := float64(m.Alloc) / 1024 / 1024 // totalAllocMB := float64(m.TotalAlloc) / 1024 / 1024 sysMB := float64(m.Sys) / 1024 / 1024 - fmt.Printf("队列 剩余: %d, Alloc = %.2f MB, Sys = %.2f MB\n", params.Value, allocMB, sysMB) - } else { - time.Sleep(time.Second * 5) + fmt.Printf("队列堆积数据: %d, Alloc = %.2f MB, Sys = %.2fMB\n", params.Value, allocMB, sysMB) } }), } diff --git a/websocket.go b/websocket.go index ae05aca..5763b56 100644 --- a/websocket.go +++ b/websocket.go @@ -87,7 +87,7 @@ func queueHandler(w http.ResponseWriter, r *http.Request) { } // 打印消息 - fmt.Printf("数据 推送到unity %s. source: [%s]\n", raddr, item.Source) + fmt.Printf("source: [%s] 数据 推送到unity [%s]\n", raddr, item.Source) } }