perf: optimize classic-only histogram observe path#2252
Open
arnabnandy7 wants to merge 8 commits into
Open
Conversation
6eaf8a0 to
8f7d299
Compare
Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
8f7d299 to
591d6ad
Compare
Contributor
|
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
2dea810 to
e539344
Compare
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
zeitlinger
added a commit
that referenced
this pull request
Jul 7, 2026
## Summary Extract the PR benchmark workflows from #2252 into a standalone PR so they can land on `main` first. ## Why The benchmark job uploads a Markdown artifact with the PR comment contents, but the actual PR comment is posted by a separate `workflow_run` workflow. GitHub only triggers `workflow_run` workflows when the workflow file already exists on the default branch, so keeping the reporter in the same PR prevents it from commenting on that PR's benchmark run. Splitting these workflows out first lets subsequent benchmark PRs use the comment-reporting flow as intended. ## Changes - add `PR Benchmarks` workflow triggered by the `benchmark` label on pull requests - add `PR Benchmark Report` workflow triggered by `workflow_run` - keep the benchmark summary as an uploaded artifact consumed by the reporter workflow ## Testing - `mise run lint:fix`
1 task
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.
Blocked by #2278
Summary
Optimizes
Histogram.classicOnly()observations by adding a dedicated classic-only fast path that uses synchronized plain fields instead of the native/hybridLongAdder/DoubleAdderplus buffer path.Fixes #1915
Changes
Histogram.DataPoint.observe()andobserveWithExemplar()through the classic-only fast path whennativeInitialSchema == CLASSIC_HISTOGRAM.Testing
.\mvnw compile -pl prometheus-metrics-core -Dcoverage.skip=true -Dcheckstyle.skip=truegit diff --check