Skip to content

Commit

Permalink
Merge pull request #14 from glennib/bench-reports
Browse files Browse the repository at this point in the history
Add bench workflow
  • Loading branch information
glennib authored Dec 27, 2024
2 parents 69cee13 + 4a4e326 commit 35e0157
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Benchmark
on:
push:
branches:
- main

permissions:
contents: write
deployments: write

jobs:
benchmark:
name: Benchmark
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run benchmark
run: cargo bench | tee bench-output.txt
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Rust Benchmark
tool: 'cargo'
output-file-path: bench-output.txt
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '200%'
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@glennib'

0 comments on commit 35e0157

Please sign in to comment.