-
Notifications
You must be signed in to change notification settings - Fork 259
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
ci: Track benchmarks with Bencher #1725
Conversation
WalkthroughWalkthroughThe recent updates to GitHub workflows for a Rust project aim to streamline benchmarking processes. These changes involve job renaming, removal of specific jobs, and the addition of workflows dedicated to main branch and pull request benchmarks. The overall goal is to enhance clarity and efficiency in managing and analyzing benchmark results. Changes
Recent Review DetailsConfiguration used: CodeRabbit UI Files selected for processing (5)
Files skipped from review as they are similar to previous changes (5)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1725 +/- ##
==========================================
- Coverage 87.18% 87.17% -0.01%
==========================================
Files 149 149
Lines 15451 15451
==========================================
- Hits 13471 13470 -1
- Misses 1980 1981 +1 ☔ View full report in Codecov by Sentry. |
Summary:
@tusharmath these changes move Tailcall over to using Bencher for tracking both the
main
branch micro-benchmarks and running micro-benchmarks on pull requests that have the labelci: benchmark
. The results for PR runs will be posted as a comment on the pull request.The macro-benchmarks are not yet moved over until there is a
wrk
adapter added to Bencher: bencherdev/bencher#347In order for things to work in the
tailcallhq/tailcall
repo, you will need to have theBENCHER_API_TOKEN
added as a Repository secret. I believe this is already in place from #1441, but I just wanted to make sure 😃I have gone ahead and created a Threshold for the
main
branch, thebenchmarking-runner
testbed, and theLatency
measure (used by Criterion): https://bencher.dev/perf/tailcall/thresholds/1ff7a58c-8add-4a72-a759-bdeccbf6ffa1This will be used to detect performance regressions on the
main
branch, and it will be cloned and used for all pull requests.Feel free to reconfigure this Threshold to suite you all's needs.
This is an overview of the benchmarking GitHub Actions files:
benchmark_main.yml
: Runs the micro-benchmarks on pushes to themain
branchbenchmark_pr_run.yml
: Runs the micro-benchmarks on PRs with the tagci: benchmark
and caches the resultsbenchmark_pr_track.yml
: Posts the micro-benchmark cached results to the PR as a commentbenchmark.yml
: Runs the macro-benchmarks on pushes tomain
and PRs with theci: benchmark
tagbenchmark_comment.yml
: Posts the macro-benchmark results to the commit as a commentThe documentation for the strategy used to track micro-benchmarks for PRs in GitHub Actions can be found there: https://bencher.dev/docs/how-to/github-actions/#benchmark-fork-pr-and-upload-from-default-branch
Issue Reference(s):
Relates to: #436
Implements: #1300
Fixes: #1441
Build & Testing:
Testing this out requires changing the default branch for the repo, as required by
workflow_run
, and usingubuntu-latest
as theruns-on
testbed.I did this in my fork using the
bencher_main
branch: https://github.com/epompeii/tailcall/tree/bencher_mainI also created a separate branch to test out creating a PR: https://github.com/epompeii/tailcall/tree/bencher_retry
This is the example pull request: epompeii#1
Which now includes a pull request comment made by Bencher with the micro-benchmark results: epompeii#1 (comment)
Again, my apologies for the hubris to not test things out the first time around. 🤦🏽♂️
cargo test
successfully../lint.sh --mode=fix
to fix all linting issues raised by./lint.sh --mode=check
.Checklist:
<type>(<optional scope>): <title>
Summary by CodeRabbit