app/vmselect/promql: consistency update after 93fbd0c54b

This commit is contained in:
Aliaksandr Valialkin 2022-07-13 12:33:04 +03:00
parent 306ec10c39
commit 29e53b9f55
No known key found for this signature in database
GPG Key ID: A72BEC6CD3D0DED1

View File

@ -644,11 +644,11 @@ func binarySearchInt64(a []int64, v int64) uint {
return i
}
func getScrapeInterval(timestamps []int64, defaultVal int64) int64 {
func getScrapeInterval(timestamps []int64, defaultInterval int64) int64 {
if len(timestamps) < 2 {
// can't calculate scrape interval with less than 2 timestamps
// return defaultVal
return defaultVal
// return defaultInterval
return defaultInterval
}
// Estimate scrape interval as 0.6 quantile for the first 20 intervals.
@ -667,7 +667,7 @@ func getScrapeInterval(timestamps []int64, defaultVal int64) int64 {
a.A = intervals
putFloat64s(a)
if scrapeInterval <= 0 {
return int64(maxSilenceInterval)
return defaultInterval
}
return scrapeInterval
}