mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vmselect/promql: further increase the allowed jitter for scrape interval
Real-world production data shows higher jitter than 1/8 of scrape interval. This may results in gaps on the graph. So increase the allowed jitter to 1/4 of scrape interval in order to reduce the probability of gaps on the graphs over time series with high jitter for scrape_interval.
This commit is contained in:
parent
fcc166622a
commit
8d93b15b86
2 changed files with 2 additions and 2 deletions
|
@ -234,7 +234,7 @@ func getMaxPrevInterval(timestamps []int64) int64 {
|
|||
return 1
|
||||
}
|
||||
// Slightly increase d in order to handle possible jitter in scrape interval.
|
||||
return d + (d / 8)
|
||||
return d + (d / 4)
|
||||
}
|
||||
|
||||
func removeCounterResets(values []float64) {
|
||||
|
|
|
@ -454,7 +454,7 @@ func TestRollupWindowPartialPoints(t *testing.T) {
|
|||
}
|
||||
rc.Timestamps = getTimestamps(rc.Start, rc.End, rc.Step)
|
||||
values := rc.Do(nil, testValues, testTimestamps)
|
||||
valuesExpected := []float64{44, 34, 34, nan}
|
||||
valuesExpected := []float64{44, 34, 34, 34}
|
||||
timestampsExpected := []int64{100, 120, 140, 160}
|
||||
testRowsEqual(t, values, rc.Timestamps, valuesExpected, timestampsExpected)
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue