Repository navigation
ci(bench): compare base and PR benchmarks on one runner - #59
Merged
Merged
Conversation
Build and run the benchmarks for the PR base and the PR merge result back to back on the same runner, and post the comparison as a sticky PR comment. Rows that do not run Patternia code (std::visit, switch) serve as controls for the measurement noise. The comparison chart and raw JSON stay available as an artifact. The job remains informational and does not block merging.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
Benchmark comparison (informational)Base Noise estimate: the 20 control rows below do not run Patternia code, so they should not change between base and PR; they moved by a median of 1.5%. Differences under 3.0% are treated as noise. Patternia: 8 benchmarks, 0 slower, 1 faster, 7 within noise.
Control rows (not Patternia code)
Raw results and the comparison chart are attached to this workflow run as an artifact. Shared runners are noisy, so use this as a trend, not a measurement. |
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.
Summary
Third step of the benchmark chart rework. The PR benchmark job used to run the benchmarks once and only upload the JSON, so the first time anyone saw a chart was after the merge. It now builds and runs the benchmarks for the PR base and for the PR merged into its base back to back on the same runner, and posts the comparison as a sticky comment on the PR. The job stays informational and does not block merging.
Changes
ci-pr.yml,benchmarkjob: check out the base commit and the PR merge result side by side, buildptn_benchfor both, run both with the existing scenario filter, runscripts/bench_compare.pyfor the chart and report, then post or update one PR comment. The job-level permissions arecontents: readandpull-requests: write. The comment step is skipped for pull requests from forks, which only get the artifact.scripts/bench_pr_comment.pybuilds the comment: Patternia rows marked slower, faster or within noise, and the remaining implementations (std::visit, switch, ...) as control rows. The controls do not run Patternia code, so how far they move between base and PR is used as the noise estimate, and a Patternia difference is only called out abovemax(3%, 2 x noise).benchmark-compare-<PR number>artifact. The scale benchmark (ptn_bench_scale) is no longer run on pull requests; the post-merge publish still produces its chart.Testing
Benchmark (informational)is still not among the required checks.gh: it posts a new comment when none carries the marker and patches the existing one otherwise, and the jq filter selects only the marked comment.