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: simplify Native Histogram arithmetics #13267

Merged
merged 1 commit into from Jan 18, 2024

Conversation

linasm
Copy link
Contributor

@linasm linasm commented Dec 8, 2023

#13208 has added support for reduction of resolution when adding/subtracting Native Histograms, so now these operations can be safely performed in any order, regardless of histogram schemas. Thanks to that change we can now simplify Native Histogram arithmetics in promql engine.
As a side effect, there will be some reduction of allocations when processing histograms with varying resolutions. Also, some .Mul(-1) calls will now be avoided.

Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
@linasm
Copy link
Contributor Author

linasm commented Jan 17, 2024

@beorn7 any comments on this?

@beorn7
Copy link
Member

beorn7 commented Jan 17, 2024

Thank you very much. This PR fell through the cracks over the holidays. (Feel free to @-mention me on histogram related PRs. The histogram related code is sprinkled all over the codebase so I cannot be auto-assigned to histogram-related PRs.)

I will look at this ASAP.

Copy link
Member

@beorn7 beorn7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much. Looks great.

@beorn7 beorn7 merged commit bfbb13c into prometheus:main Jan 18, 2024
24 checks passed
@bboreham bboreham mentioned this pull request Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants