fix
This commit is contained in:
parent
a979baecd7
commit
3c0cdbfdd9
14
sm.go
14
sm.go
|
@ -37,14 +37,12 @@ func NewSMQueue(shardID uint64, replicaID uint64) sm.IStateMachine {
|
|||
queues: make(map[string]*PriorityQueue[QueueItem]),
|
||||
|
||||
counter: triggered.RegisterExecute[int64](func(params *triggered.Params[int64]) {
|
||||
if params.Value != 0 {
|
||||
var m runtime.MemStats
|
||||
runtime.ReadMemStats(&m)
|
||||
allocMB := float64(m.Alloc) / 1024 / 1024
|
||||
// totalAllocMB := float64(m.TotalAlloc) / 1024 / 1024
|
||||
sysMB := float64(m.Sys) / 1024 / 1024
|
||||
log.Printf("队列堆积数据: %d, Alloc = %.2f MB, Sys = %.2fMB\n", params.Value, allocMB, sysMB)
|
||||
}
|
||||
var m runtime.MemStats
|
||||
runtime.ReadMemStats(&m)
|
||||
allocMB := float64(m.Alloc) / 1024 / 1024
|
||||
// totalAllocMB := float64(m.TotalAlloc) / 1024 / 1024
|
||||
sysMB := float64(m.Sys) / 1024 / 1024
|
||||
log.Printf("队列堆积数据: %d, Alloc = %.2f MB, Sys = %.2fMB\n", params.Value, allocMB, sysMB)
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user