Mimir query engine: add support for min_over_time, max_over_time, sum_over_time and avg_over_time#8934
Merged
charleskorn merged 14 commits intomainfrom Aug 12, 2024
Merged
Conversation
0eaf8d9 to
33fef8f
Compare
…time` and `present_over_time`
…native histograms
1794e9e to
dc3b6a9
Compare
min_over_time and max_over_timemin_over_time, max_over_time, sum_over_time and avg_over_time
Contributor
Author
|
Putting this back to draft to incorporate changes from prometheus/prometheus#14413 |
jhesketh
reviewed
Aug 9, 2024
Contributor
jhesketh
left a comment
There was a problem hiding this comment.
I know it's a draft. Just getting a head start :-)
| }, | ||
| }, | ||
|
|
||
| "sum_over_time() over series with both floats and histograms": { |
Contributor
There was a problem hiding this comment.
(nit)
It might be worth splitting out the _over_time functions into their own test so we can check the common case of mixed metrics etc iterating over the function.
Contributor
Author
There was a problem hiding this comment.
I'm inclined to leave this as-is for the time being - until prometheus/prometheus#14609 is vendored into Mimir, we need to skip one of the rate test cases that would fall into this group of tests, and I don't think it's so bad that the tests are repeated.
# Conflicts: # pkg/streamingpromql/testdata/upstream/functions.test
jhesketh
approved these changes
Aug 12, 2024
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What this PR does
This PR adds support for the following functions to MQE:
min_over_timemax_over_timesum_over_timeavg_over_timetl;dr of benchmark results:
sum_over_timeandavg_over_timeare up to 30% faster for floats and up to 50% faster for native histograms compared to Prometheus' engine. Peak memory consumption is largely the same, which is unsurprising given the final result dominates memory consumption in the benchmark cases.Benchmark results for
sum_over_timeandavg_over_time, compared to Prometheus' engineWhich issue(s) this PR fixes or relates to
(none)
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX].about-versioning.mdupdated with experimental features.