mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 08:05:43 -06:00
Prometheus: Fix integer overflow in rate interval calculation (#52051)
Affecting only 32-bit architectures.
This commit is contained in:
parent
ac0f5c5556
commit
2c622b912a
@ -181,7 +181,7 @@ func calculateRateInterval(interval time.Duration, scrapeInterval string, interv
|
||||
return time.Duration(0)
|
||||
}
|
||||
|
||||
rateInterval := time.Duration(int(math.Max(float64(interval+scrapeIntervalDuration), float64(4)*float64(scrapeIntervalDuration))))
|
||||
rateInterval := time.Duration(int64(math.Max(float64(interval+scrapeIntervalDuration), float64(4)*float64(scrapeIntervalDuration))))
|
||||
return rateInterval
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user