MCPcopy Create free account
hub / github.com/cortexproject/cortex / NewEWMARate

Function NewEWMARate

pkg/util/math/rate.go:22–27  ·  view source on GitHub ↗
(alpha float64, interval time.Duration)

Source from the content-addressed store, hash-verified

20}
21
22func NewEWMARate(alpha float64, interval time.Duration) *EwmaRate {
23 return &EwmaRate{
24 alpha: alpha,
25 interval: interval,
26 }
27}
28
29// Rate returns the per-second rate.
30func (r *EwmaRate) Rate() float64 {

Callers 1

TestRateFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestRateFunction · 0.68