Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

promql: Limit extrapolation of delta/rate/increase #1295

Merged
merged 1 commit into from Jan 8, 2016
Merged

promql: Limit extrapolation of delta/rate/increase #1295

merged 1 commit into from Jan 8, 2016

Conversation

@beorn7
Copy link
Member

beorn7 commented Jan 8, 2016

Here the promised PR. I'm planning to write a blog post about the whole rationale behind the extrapolation… Will be fun.

The new implementation detects the start and end of a series by
looking at the average sample interval within the range. If the first
(last) sample in the range is more than 1.1*interval distant from the
beginning (end) of the range, it is considered the first (last) sample
of the series as a whole, and extrapolation is limited to half the
interval (rather than all the way to the beginning (end) of the
range). In addition, if the extrapolated starting point of a counter
(where it is zero) is within the range, it is used as the starting
point of the series.

Fixes #581

@brian-brazil

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Jan 8, 2016

👍

// will exist given the spacing between samples we've seen thus far,
// with an allowance for noise.
extrapolationThreshold := averageDurationBetweenSamples * 1.1
extrapolateToInterval := sampledInterval

This comment has been minimized.

Copy link
@grobie

grobie Jan 8, 2016

Member

Would it be possible to move these lines+comment below the next if block? I found it hard to follow to read about extrapolation, then negative counter capping, then back to extrapolation.

This comment has been minimized.

Copy link
@beorn7

beorn7 Jan 8, 2016

Author Member

Sure...

@beorn7

This comment has been minimized.

Copy link
Member Author

beorn7 commented Jan 8, 2016

Merging. \o/

The new implementation detects the start and end of a series by
looking at the average sample interval within the range. If the first
(last) sample in the range is more than 1.1*interval distant from the
beginning (end) of the range, it is considered the first (last) sample
of the series as a whole, and extrapolation is limited to half the
interval (rather than all the way to the beginning (end) of the
range). In addition, if the extrapolated starting point of a counter
(where it is zero) is within the range, it is used as the starting
point of the series.

Fixes #581
@beorn7 beorn7 force-pushed the beorn7/rate branch to c77c3a8 Jan 8, 2016
beorn7 added a commit that referenced this pull request Jan 8, 2016
promql: Limit extrapolation of delta/rate/increase
@beorn7 beorn7 merged commit c0474d5 into master Jan 8, 2016
0 of 2 checks passed
0 of 2 checks passed
ci/circleci CircleCI is running your tests
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@beorn7 beorn7 deleted the beorn7/rate branch Jan 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.