fix: expMovingAvg is too small when startTime is zero (#17346)

This commit is contained in:
jiuker
2023-06-04 04:41:51 +08:00
committed by GitHub
parent a485b923bf
commit 8030e12ba5

View File

@@ -57,6 +57,10 @@ func (m *bucketMeasurement) updateExponentialMovingAverage(endTime time.Time) {
m.lock.Unlock()
}()
if m.startTime.IsZero() {
return
}
if endTime.Before(m.startTime) {
return
}