From 3d17f9f91e0205533e804883c69f3bd36a7df394 Mon Sep 17 00:00:00 2001 From: James Hinshelwood Date: Fri, 17 Jan 2025 18:02:52 +0000 Subject: [PATCH] Add benchmark backfill workflow --- .github/workflows/backfill_benchmarks.yaml | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/backfill_benchmarks.yaml diff --git a/.github/workflows/backfill_benchmarks.yaml b/.github/workflows/backfill_benchmarks.yaml new file mode 100644 index 0000000000..59b80a99a5 --- /dev/null +++ b/.github/workflows/backfill_benchmarks.yaml @@ -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" + required: true + type: string + +jobs: + backfill_benchmarks: + name: Backfill Benchmarks + runs-on: self-hosted + 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: Track base branch 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 }}"'