From 967a4c774842162048b4b7d71ba072ad39034f3e Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 18 May 2022 21:09:49 +0800 Subject: [PATCH] statistic update --- pkg/statistics/statistics.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/statistics/statistics.go b/pkg/statistics/statistics.go index 800f5864b..50d6a2814 100644 --- a/pkg/statistics/statistics.go +++ b/pkg/statistics/statistics.go @@ -17,6 +17,7 @@ func (s *Statistics) output() { t := time.NewTicker(time.Duration(s.SleepTime) * time.Second) defer t.Stop() var sum uint64 + var timeIntervalNum uint64 for { sum = *s.AllCount select { @@ -27,7 +28,8 @@ func (s *Statistics) output() { } else { 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) } }