Uh oh!
There was an error while loading. Please reload this page.
forked from prometheus/prometheus
- Notifications
You must be signed in to change notification settings - Fork 0
Add yrate/yincrease/ydelta (2.55)#22
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
Open
ColinDKelley
wants to merge
9
commits into
invoca-2.55.1-baseChoose a base branch
from
invoca-2.55.1/add-yrate
base:invoca-2.55.1-base
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Uh oh!
There was an error while loading. Please reload this page.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
218fcbb
Add yIncrease and rangeFromSelectors helpers
ColinDKelley ee9b0b5
Add yrate/yincrease/ydelta PromQL functions
ColinDKelley abed04c
Add REPLACE_RATE_FUNCS env switch for yrate; run once at init
ColinDKelley 6f67479
Add yrate/yincrease/ydelta test cases
ColinDKelley ef7345c
Add linearity-invariant tests for yincrease
ColinDKelley 554aac3
Switch yrate terminology: "linearity" -> "additivity" / "composability"
ColinDKelley 00216ac
Use triangular showcase counter to expose boundary and origin bugs.
ColinDKelley 3114ec2
Use incrementing-delta test series beyond the rate showcase.
ColinDKelley 8dba4ff
Simplify additivity_reset_late scenario comment.
ColinDKelley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see we're doing an inclusive range at rangestart but not inclusive at rangeEnd. Is this what we always had 🤔 I guess it doesn't matter that much because the rangeEnd is the instant eval timestamp which won't likely fall on the exact timestamp of a point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(from Colin)
I understand we flipped to
(rangeStartMsec, rangeEngdMsec]so this comment is likely out of date. I'll have Cursor confirm.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(via Cursor — posting as Colin)
Yes — on this PR (#22) the y-family range is
[rangeStartMsec, rangeEndMsec)(inclusive left, exclusive right). That matches whatyIncreaseandrangeFromSelectorsimplement here:points[i].T < rangeEndMsecpoints[i].T >= rangeStartMsecSo a sample whose timestamp equals
rangeEnd(the eval instant) is not counted — which is exactly what drives the 25s vs 26s/bardifference in the other thread.Historical note: this is the semantics we shipped on the original 2.53/2.55 yrate port. Colin’s right that it’s out of date relative to later stack PRs: #20 (
align-yrate-to-3x-range-boundary) flips to(rangeStartMsec, rangeEndMsec]to match Prometheus 3.x range-selector boundary rules (prometheus#13213). If you’re reviewing the full stack, read the comment on #20+; if you’re reviewing only #22, the[start, end)comment is accurate for this layer.And agreed it usually doesn’t matter when eval times fall off the scrape grid — these tests use 24s / 25s / 26s evals deliberately so boundary behavior is visible.