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:
Aliaksandr Valialkin 2019-08-02 20:10:21 +03:00
parent 8ed84a4713
commit 1d4ddadbb1
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -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)
})