Add action to run benchmarks - #1509
Open
dalonsoa wants to merge 3 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1509 +/- ##
=======================================
Coverage 90.31% 90.31%
=======================================
Files 60 60
Lines 8663 8663
Branches 8663 8663
=======================================
Hits 7824 7824
Misses 525 525
Partials 314 314 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds benchmark execution and reporting to the existing CI workflow to address #1453 by running cargo bench in GitHub Actions and publishing benchmark results/alerts.
Changes:
- Added a new
benchmarkjob to runcargo benchonubuntu-latest. - Integrated
benchmark-action/github-action-benchmark@v1to publish a job summary and comment on regressions.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+44
to
+56
| benchmark: | ||
| name: Run benchmarks | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
|
|
||
| - name: Run cargo bench | ||
| shell: bash | ||
| run: cargo bench --no-fail-fast | tee output.txt | ||
|
|
||
| - name: Store benchmark result |
Comment on lines
+44
to
+47
| benchmark: | ||
| name: Run benchmarks | ||
| runs-on: ubuntu-latest | ||
|
|
Comment on lines
+59
to
+62
| tool: "cargo" | ||
| output-file-path: output.txt | ||
| external-data-json-path: ./cache/benchmark-data.json | ||
| fail-on-alert: true |
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.
Description
The build and test action has been updated to run the benchmarks and publish the summary in the action itself, as well as creating an Alert comment in the relevant places wherever there has been a regression.
Fixes #1453
Type of change
Key checklist
$ cargo test$ cargo docpresent in the previous release
Further checks