Skip to content

add benchmark action #13

add benchmark action

add benchmark action #13

Workflow file for this run

name: Run Benchmarks
on: pull_request
permissions:
deployments: write
contents: write
pull-requests: write
jobs:
benchmark:
name: Benchmark
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2.7.7
- run: cargo install cargo-criterion
- run: cargo criterion --output-format bencher 2>&1 | tee output.txt
- uses: benchmark-action/github-action-benchmark@v1.20.4
with:
name: Rust Benchmark
tool: "cargo"
output-file-path: output.txt
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
alert-threshold: "120%"
comment-always: true
fail-on-alert: true