statistic update

pull/232/head
Gordon 3 years ago
parent d92d6e84d0
commit 967a4c7748

@ -17,6 +17,7 @@ func (s *Statistics) output() {
t := time.NewTicker(time.Duration(s.SleepTime) * time.Second) t := time.NewTicker(time.Duration(s.SleepTime) * time.Second)
defer t.Stop() defer t.Stop()
var sum uint64 var sum uint64
var timeIntervalNum uint64
for { for {
sum = *s.AllCount sum = *s.AllCount
select { select {
@ -27,7 +28,8 @@ func (s *Statistics) output() {
} else { } else {
intervalCount = *s.AllCount - sum intervalCount = *s.AllCount - sum
} }
log.NewWarn("", " system stat ", s.ModuleName, s.PrintArgs, intervalCount, "total:", *s.AllCount) timeIntervalNum++
log.NewWarn("", " system stat ", s.ModuleName, s.PrintArgs, intervalCount, "total:", *s.AllCount, "intervalNum", timeIntervalNum)
} }
} }

Loading…
Cancel
Save