grafana/mimir

Add warmup to EwmaRate

Open

#5,443 opened on Jul 6, 2023

View on GitHub
 (10 comments) (0 reactions) (0 assignees)Go (808 forks)auto 404
buggood first issue

Repository metrics

Stars
 (5,181 stars)
PR merge metrics
 (PR metrics pending)

Description

Describe the bug

The current math.EwmaRate implementation does not require a warmup period, allowing a rate to be available after a single sample is added, which can lead to unexpected results, as described in #5394. Let's move warmup support from that PR into EwmaRate itself, to avoid problems with other users of this type.

Contributor guide