Push benchmark results to GitHub pages#193
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #193 +/- ##
==========================================
+ Coverage 86.03% 86.27% +0.23%
==========================================
Files 34 34
Lines 9331 9331
Branches 9331 9331
==========================================
+ Hits 8028 8050 +22
+ Misses 1170 1148 -22
Partials 133 133 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: Simon Marty <martysi@amazon.com>
Signed-off-by: Simon Marty <martysi@amazon.com>
| working-directory: aws_secretsmanager_caching | ||
| run: cargo bench --bench benchmark -- --output-format bencher | tee ../bench-result.txt | ||
|
|
||
| - name: Download previous benchmark data |
There was a problem hiding this comment.
for my edification: why is this being removed? Does benchmark-action/github-action-benchmark@v1 do this for you?
There was a problem hiding this comment.
Sorry it took a minute to respond, I figured I could show you on my fork.
Here's a run from a push to main on the fork: https://github.com/simonmarty/aws-secretsmanager-agent/actions/runs/24808395936/job/72763846297
Here's a run against a no-op pull request I created on my fork, it correctly retrieves the test run results simonmarty#61 https://github.com/simonmarty/aws-secretsmanager-agent/actions/runs/24855062991/job/72765608319?pr=61
This does make me realize that there must be some variance in the performance of GitHub actions hosted runners. It's failing the regression check despite there not being any code changes. I'm going to set the workflow to be non-blocking and just post comments. Maybe up the tolerance threshold to the default of 200%.
Signed-off-by: Simon Marty <martysi@amazon.com>
Signed-off-by: Simon Marty <martysi@amazon.com>
| with: | ||
| name: Secrets Manager Agent Benchmarks | ||
| tool: cargo | ||
| output-file-path: bench-result.txt |
There was a problem hiding this comment.
The benchmark name here is 'Secrets Manager Agent Benchmarks' while the PR check workflow (benchmarks.yml) uses 'Secrets Manager Caching Benchmarks'. The github-action-benchmark stores and compares data keyed by this name. With mismatched names, the PR workflow will never find the baseline data pushed by this workflow, so PR comparisons will be against an empty/different dataset. These must match.
AI-generated, feedback may be incorrect
|
|
||
| - name: Compare benchmarks | ||
| uses: benchmark-action/github-action-benchmark@v1 | ||
| with: |
There was a problem hiding this comment.
After removing external-data-json-path (the cache) along with alert-threshold and fail-on-alert, this 'Compare benchmarks' step on PRs no longer has any baseline data to compare against locally, nor does it gate anything. For PRs (which don't typically have write access to push to the gh-pages branch), github-action-benchmark cannot fetch the baseline without external-data-json-path or save-data-file. Verify the PR comparison actually works—otherwise this step silently does nothing useful.
AI-generated, feedback may be incorrect
| - name: Run benchmarks | ||
| working-directory: aws_secretsmanager_caching | ||
| run: cargo bench --bench benchmark -- --output-format bencher | tee ../bench-result.txt | ||
|
|
There was a problem hiding this comment.
There's no toolchain pinning/setup step (e.g. dtolnay/rust-toolchain or actions/setup). The baseline is built with whatever Rust ships on the ubuntu-latest image, which drifts over time. Benchmark baselines are sensitive to compiler version; unpinned toolchains can introduce phantom regressions in PR comparisons. Consider pinning the toolchain for reproducible baselines.
AI-generated, feedback may be incorrect
Signed-off-by: Simon Marty <martysi@amazon.com>
Description
Why is this change being made?
What is changing?
We keep the two separate because they have different levels of permissions.
Related Links
Testing
Tested on fork https://simonmarty.github.io/aws-secretsmanager-agent/dev/bench/
Made a mock PR https://github.com/simonmarty/aws-secretsmanager-agent/actions/runs/24591788832
How was this tested?
When testing locally, provide testing artifact(s):
Reviewee Checklist
Update the checklist after submitting the PR
If not, why:
If not, why:
If not, why:
If not, why:
If not, why:
If not, why: No change
If not, why:
If not, why:
If not, why: No change
If not, why: No breaking changes.
Reviewer Checklist
All reviewers please ensure the following are true before reviewing:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.