Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Block building benchmark via github-action-benchmark #11202

Merged
merged 15 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 21 additions & 51 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ jobs:
ci3/cache_upload_flag "$artifact"
fi

# all the benchmarking end-to-end integration tests for aztec (not required to merge)
# All the benchmarking end-to-end integration tests for aztec (not required to merge)
bench-e2e:
needs: [images-e2e, configure]
if: needs.configure.outputs.e2e-all == 'true' || needs.configure.outputs.bench-list != '[]'
Expand All @@ -260,15 +260,28 @@ jobs:
if ci3/test_should_run "$artifact"; then
docker pull aztecprotocol/aztec:${{ env.GIT_COMMIT }}
docker pull aztecprotocol/end-to-end:${{ env.GIT_COMMIT }}
export FORCE_COLOR=1
export EARTHLY_BUILD_ARGS="${{ env.EARTHLY_BUILD_ARGS }}"
./yarn-project/end-to-end/scripts/e2e_test.sh ${{ matrix.test }}
export COMMIT_HASH=${{ env.GIT_COMMIT }}
export PULL_REQUEST=${{ github.event.pull_request.number }}
export BRANCH=${{ github.ref_name }}
scripts/logs/upload_logs_to_s3.sh /usr/var/log
FORCE_COLOR=1 ./yarn-project/end-to-end/scripts/e2e_test.sh ${{ matrix.test }}
ci3/cache_upload_flag "$artifact"
fi
- name: Inspect data folder
continue-on-error: true
run: tree ./yarn-project/end-to-end/out
- name: Store benchmark result
if: github.ref == 'refs/heads/master'
continue-on-error: true
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
with:
name: "End-to-end Benchmark"
benchmark-data-dir-path: "dev/e2e-bench"
tool: "customSmallerIsBetter"
output-file-path: ./yarn-project/end-to-end/out/bench.json
github-token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
auto-push: true
alert-threshold: "150%"
comment-on-alert: true
fail-on-alert: false
alert-comment-cc-users: "@philwindle @spalladino"
max-items-in-chart: 50

# Only e2e test that can't run on standard github runner
e2e-prover-full:
Expand Down Expand Up @@ -320,49 +333,6 @@ jobs:
ci3/cache_upload_flag acir-bench-$(./barretenberg/acir_tests/bootstrap.sh hash)
fi

# TODO(ci3) fix and reinstate
# bench-summary:
# if: needs.configure.outputs.e2e-all == 'true'
# needs:
# - acir-bench
# - bench-e2e
# - configure
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 100 # Downloading base benchmark from master requires access to history
# ref: "${{ github.event.pull_request.head.sha }}"
# - uses: ./.github/ci-setup-action
# - name: "Build and upload bench aggregate file"
# uses: ./.github/ensure-builder
# with:
# runner_type: builder-x86
# username: ${{ needs.configure.outputs.username }}
# run: scripts/earthly-ci ./yarn-project/scripts/+bench-aggregate
# - name: "Download base benchmark and package into earthly"
# if: github.event_name == 'pull_request'
# uses: ./.github/run-on-builder
# env:
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# BENCH_FOLDER: "./scripts/logs/tmp/bench"
# PULL_REQUEST: "${{ github.event.pull_request.number }}"
# with:
# run: |
# # Download the base benchmark locally (requires AWS creds and .git history)
# mkdir -p $BENCH_FOLDER
# ./scripts/logs/download_base_benchmark_from_s3.sh
# # Package it into an earthly artifact to read from bench-comment
# scripts/earthly-ci ./scripts/logs+pack-base-benchmark
# - name: "Generate summary comment if pull request"
# if: github.event_name == 'pull_request'
# uses: ./.github/run-on-builder
# env:
# AZTEC_BOT_GITHUB_TOKEN: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
# with:
# run: scripts/earthly-ci ./yarn-project/scripts/+bench-comment

# barretenberg (prover) native, AVM (public VM) and Merkle tree (world state) tests
# ran on own runner for resource reasons (memory x cpu intensive)
bb-native-tests:
Expand Down
20 changes: 0 additions & 20 deletions scripts/logs/Earthfile

This file was deleted.

25 changes: 0 additions & 25 deletions scripts/logs/check_logs_for_benchmark.sh

This file was deleted.

35 changes: 0 additions & 35 deletions scripts/logs/download_base_benchmark_from_s3.sh

This file was deleted.

36 changes: 0 additions & 36 deletions scripts/logs/download_logs_from_s3.sh

This file was deleted.

37 changes: 0 additions & 37 deletions scripts/logs/upload_aggregated_benchmarks_to_s3.sh

This file was deleted.

33 changes: 0 additions & 33 deletions scripts/logs/upload_logs_to_s3.sh

This file was deleted.

12 changes: 0 additions & 12 deletions yarn-project/circuit-types/src/stats/benchmarks.ts

This file was deleted.

17 changes: 0 additions & 17 deletions yarn-project/circuit-types/src/stats/index.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1 @@
export * from './stats.js';
export * from './metrics.js';
export * from './benchmarks.js';

/** Block sizes to use for benchmark tests on multiple block sizes. */
export const BENCHMARK_BLOCK_SIZES = process.env.BENCHMARK_BLOCK_SIZES
? process.env.BENCHMARK_BLOCK_SIZES.split(',').map(Number)
: [4, 8, 16];

/** Block size to use for building chains of multiple blocks. */
export const BENCHMARK_HISTORY_BLOCK_SIZE = process.env.BENCHMARK_HISTORY_BLOCK_SIZE
? +process.env.BENCHMARK_HISTORY_BLOCK_SIZE
: 8;

/** Chain lengths to test for history processing benchmarks. */
export const BENCHMARK_HISTORY_CHAIN_LENGTHS = process.env.BENCHMARK_HISTORY_CHAIN_LENGTHS
? process.env.BENCHMARK_HISTORY_CHAIN_LENGTHS.split(',').map(x => Number(x))
: [3, 5];
Loading
Loading