Skip to content

ci: update benching to use tango #11

ci: update benching to use tango

ci: update benching to use tango #11

Workflow file for this run

name: Benchmark PRs
on:
pull_request:
branches: [ main ]
# types: [opened, reopened, edited, synchronize]
env:
RUST_NIGHTLY_TOOLCHAIN: nightly-2024-03-24
jobs:
benchmark_pr_branch:
name: Continuous Benchmarking PRs with Bencher
# DO NOT REMOVE: For handling Fork PRs see Pull Requests from Forks
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
# checkout main
- uses: actions/checkout@v4
with:
ref: main
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
- uses: Swatinem/rust-cache@v2
- uses: bencherdev/bencher@main
- name: Step 1
run: |
bencher run \
--project hyperion \
--token '${{ secrets.BENCHER_API_TOKEN }}' \
--branch '${{ github.head_ref }}' \
--branch-reset
--testbed ubuntu-latest \
--adapter rust_criterion \
--github-actions '${{ secrets.GITHUB_TOKEN }}' \
cargo bench --bench=sort
- name: Step 2
run: |
bencher threshold create \
--branch '${{ github.head_ref }}' \
--token '${{ secrets.BENCHER_API_TOKEN }}' \
--testbed ci-runner \
--measure Latency \
--test percentage \
--upper-boundary 0.05 \
hyperion
# checkout PR branch
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Step 3
run: |
bencher run \
--project hyperion \
--token '${{ secrets.BENCHER_API_TOKEN }}' \
--branch '${{ github.head_ref }}' \
--testbed ubuntu-latest \
--adapter rust_criterion \
--github-actions '${{ secrets.GITHUB_TOKEN }}' \
--err \
cargo bench --bench=sort