You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Criterion Compare PRs
v3.0.0
Compare the performance of a PR against the base branch.
⚠️ Performance benchmarks provided by this action may fluctuate as load on GitHub Actions does. Run benchmarks locally before making any decisions based on the results.
A GitHub action that will compare the benchmark output between a PR and the base branch, using the project's criterion.rs benchmarks.
Create a .github/workflows/pull_request.yml
file in your repo:
on: [pull_request]
name: benchmark pull requests
jobs:
runBenchmark:
name: run benchmark
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: jasonwilliams/criterion-compare-action@3.0.0
with:
cwd: "subDirectory (optional)"
# Optional. Compare only this benchmark target
benchName: "example-bench-target"
# Needed. The name of the branch to compare with. This default uses the branch which is being pulled against
branchName: ${{ github.base_ref }}
token: ${{ secrets.GITHUB_TOKEN }}
If you encounter this error, you can check this Criterion FAQ, to find a workaround.