Skip to content

Commit

Permalink
Add benchmark backfill workflow (#2173)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHinshelwood authored Jan 18, 2025
1 parent 6ca80f8 commit 7134532
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/backfill_benchmarks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
on:
workflow_dispatch:
inputs:
from:
description: "Commit to backfill from"
required: true
type: string
to:
description: "Commit to backfill to"
required: true
type: string
benchmarks:
description: "Filter for benchmarks to run while backfilling"
type: string

jobs:
backfill_benchmarks:
name: Backfill Benchmarks
runs-on: self-hosted
timeout-minutes: 2880
steps:
- uses: actions/checkout@v4
- uses: bencherdev/bencher@main
- name: Install Rust
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install dependencies
run: sudo add-apt-repository ppa:ethereum/ethereum && sudo apt update && sudo apt install -y solc build-essential pkg-config libssl-dev cmake protobuf-compiler

- name: Backfill benchmarks
run: |
git rev-list ^${{ inputs.from }}~ ${{ inputs.to }} --reverse | \
xargs -I{} sh -c 'git checkout {} --quiet && \
bencher run \
--project zq2 \
--token "${{ secrets.BENCHER_API_TOKEN }}" \
--branch main \
--testbed self-hosted \
--threshold-measure latency \
--threshold-test t_test \
--threshold-max-sample-size 64 \
--threshold-upper-boundary 0.99 \
--thresholds-reset \
--adapter rust_criterion \
--backdate $(git show --no-patch --format=%ct) \
cargo bench -- "${{ inputs.benchmarks }}"'

0 comments on commit 7134532

Please sign in to comment.