Skip to content

Implement shuffled batched iteration in Rust (#245) #21

Implement shuffled batched iteration in Rust (#245)

Implement shuffled batched iteration in Rust (#245) #21

# Based on the tutorial https://bencher.dev/docs/how-to/github-actions/
on:
push:
branches: main
paths:
- '**/*.rs'
- 'rust/Cargo.toml'
- 'rust/Cargo.lock'
schedule:
# Run once a month (random values for minute, hour, day; any month or day)
- cron: "3 1 4 * *"
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:
jobs:
benchmark_base_branch:
# Run only on the upstream repository.
if: github.repository == 'google/sedpack'
name: Continuous Benchmarking with Bencher
permissions:
checks: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
cache: 'pip'
- name: Installing sedpack pip package
run: |
pip install sedpack
- name: Prepare benchmarking data
working-directory: ./rust
run: bash benches/setup.sh
- uses: actions-rust-lang/setup-rust-toolchain@fb51252c7ba57d633bc668f941da052e410add48 # v1
- uses: bencherdev/bencher@f89d454e74a32a81b2eab29fe0afdb2316617342 # v0.5
- name: Track base branch benchmarks with Bencher
working-directory: ./rust
run: |
bencher run \
--project sedpack \
--token '${{ secrets.BENCHER_API_TOKEN }}' \
--branch main \
--testbed ubuntu-latest \
--threshold-measure latency \
--threshold-test t_test \
--threshold-max-sample-size 64 \
--threshold-upper-boundary 0.99 \
--thresholds-reset \
--err \
--adapter rust_criterion \
--github-actions '${{ secrets.GITHUB_TOKEN }}' \
"cargo bench"