mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 16:30:55 +01: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
8ed84a4713
commit
1d4ddadbb1
@ -234,7 +234,7 @@ func getMaxPrevInterval(timestamps []int64) int64 {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
// Slightly increase d in order to handle possible jitter in scrape interval.
|
// Slightly increase d in order to handle possible jitter in scrape interval.
|
||||||
return d + (d / 8)
|
return d + (d / 4)
|
||||||
}
|
}
|
||||||
|
|
||||||
func removeCounterResets(values []float64) {
|
func removeCounterResets(values []float64) {
|
||||||
|
@ -454,7 +454,7 @@ func TestRollupWindowPartialPoints(t *testing.T) {
|
|||||||
}
|
}
|
||||||
rc.Timestamps = getTimestamps(rc.Start, rc.End, rc.Step)
|
rc.Timestamps = getTimestamps(rc.Start, rc.End, rc.Step)
|
||||||
values := rc.Do(nil, testValues, testTimestamps)
|
values := rc.Do(nil, testValues, testTimestamps)
|
||||||
valuesExpected := []float64{44, 34, 34, nan}
|
valuesExpected := []float64{44, 34, 34, 34}
|
||||||
timestampsExpected := []int64{100, 120, 140, 160}
|
timestampsExpected := []int64{100, 120, 140, 160}
|
||||||
testRowsEqual(t, values, rc.Timestamps, valuesExpected, timestampsExpected)
|
testRowsEqual(t, values, rc.Timestamps, valuesExpected, timestampsExpected)
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user