8000 promql: use histogram stats decoder for histogram_avg by linasm · Pull Request #15849 · prometheus/prometheus · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

promql: use histogram stats decoder for histogram_avg #15849

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

Merged

Conversation

linasm
Copy link
Contributor
@linasm linasm commented Jan 21, 2025

histogram_avg would also benefit from the optimizations introduced in #14097, just like histogram_sum and histogram_count (because it only depends on Count and Sum fields of the histogram object).

@linasm linasm requested a review from roidelapluie as a code owner January 21, 2025 12:14
@linasm linasm force-pushed the use-histogram-stats-decoder-for-histogram_avg branch from 3c51aac to b6d1e97 Compare January 21, 2025 12:15
@beorn7 beorn7 self-requested a review January 21, 2025 16:49
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.

Makes sense, thank you very much.

But maybe let's use a switch statement for better readability and less verbosity?

@linasm linasm force-pushed the use-histogram-stats-decoder-for-histogram_avg branch from b6d1e97 to e6e6b03 Compare January 23, 2025 06:48
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
@linasm linasm force-pushed the use-histogram-stats-decoder-for-histogram_avg branch from e6e6b03 to 940016e Compare January 23, 2025 06:49
@linasm linasm requested a review from beorn7 January 23, 2025 06:50
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.

@beorn7 beorn7 merged commit 8846e42 into prometheus:main Jan 23, 2025
26 checks passed
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.

2 participants
0