缩短指标统计队列长度

This commit is contained in:
刘祥超
2022-05-18 21:41:34 +08:00
parent 9bdd9a433c
commit 298cef7f05

View File

@@ -23,7 +23,7 @@ import (
"time"
)
const MaxQueueSize = 10240
const MaxQueueSize = 2048
// Task 单个指标任务
// 数据库存储:
@@ -58,7 +58,7 @@ type Task struct {
timeMap map[string]zero.Zero // time => bool
serverIdMapLocker sync.Mutex
statsMap map[string]*Stat
statsMap map[string]*Stat // 待写入队列hash => *Stat
statsLocker sync.Mutex
statsTicker *utils.Ticker
}