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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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
}