显示队列堆积数量
This commit is contained in:
parent
568ac634bb
commit
3c6efe19ba
5
sm.go
5
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)
|
||||
}
|
||||
}),
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user