From e9de00a07b152f0916227414c10cd267028de617 Mon Sep 17 00:00:00 2001 From: Eagle941 <8973725+Eagle941@users.noreply.github.com> Date: Tue, 17 Sep 2024 15:11:08 +0100 Subject: [PATCH 1/2] chore: added benchmark comparison script --- scripts/bench.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 scripts/bench.sh diff --git a/scripts/bench.sh b/scripts/bench.sh new file mode 100644 index 0000000000..3c839a67db --- /dev/null +++ b/scripts/bench.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# This script analyses the peformance changes of commit $2 with respect to $1. + +cd "$(dirname "$0")" + +BEFORE_CHANGES_COMMIT=$1 +AFTER_CHANGES_COMMIT=$2 + +git checkout -q $BEFORE_CHANGES_COMMIT +echo "Running bechmark on commit $BEFORE_CHANGES_COMMIT" +cargo bench --quiet --locked --bench blockifier_bench -- --save-baseline before_changes --noplot > /dev/null 2>&1 + +git checkout -q $AFTER_CHANGES_COMMIT +echo "Running bechmark on commit $AFTER_CHANGES_COMMIT" +cargo bench --quiet --locked --bench blockifier_bench -- --save-baseline after_changes --noplot > /dev/null 2>&1 + +cargo bench --quiet --bench blockifier_bench -- --load-baseline after_changes --baseline before_changes --noplot --verbose From 7e440033dda42605348c67fe8493c675981b706e Mon Sep 17 00:00:00 2001 From: Eagle941 <8973725+Eagle941@users.noreply.github.com> Date: Tue, 17 Sep 2024 16:54:46 +0100 Subject: [PATCH 2/2] chore: removed native-blockifier-artifacts-push to merge PR in fork --- .github/workflows/ci.yml | 46 ---------------------------------------- 1 file changed, 46 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e9e6c51b4d..1df47beb22 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -121,52 +121,6 @@ jobs: - run: cargo test - run: cargo test --features concurrency - native-blockifier-artifacts-push: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - - - uses: Swatinem/rust-cache@v2 - with: - prefix-key: "v0-rust-ubuntu-20.04" - - - name: Build native blockifier - run: ./build_native_blockifier.sh - - # Commit hash on pull request event would be the head commit of the branch. - - name: Get commit hash prefix for PR update - if: ${{ github.event_name == 'pull_request' }} - env: - COMMIT_SHA: ${{ github.event.pull_request.head.sha }} - run: echo "SHORT_HASH=${COMMIT_SHA:0:7}" >> $GITHUB_ENV - - # On push event (to main, for example) we should take the commit post-push. - - name: Get commit hash prefix for merge - if: ${{ github.event_name != 'pull_request' }} - env: - COMMIT_SHA: ${{ github.event.after }} - run: echo "SHORT_HASH=${COMMIT_SHA:0:7}" >> $GITHUB_ENV - - # Rename is required; see https://pyo3.rs/v0.19.2/building_and_distribution#manual-builds. - - name: Rename shared object - run: | - mv \ - target/release/libnative_blockifier.so \ - target/release/native_blockifier.pypy39-pp73-x86_64-linux-gnu.so - - - name: Authenticate with GCS - uses: "google-github-actions/auth@v2" - with: - credentials_json: ${{ secrets.SA_NATIVE_BLOCKIFIER_ARTIFACTS_BUCKET_WRITER_ACCESS_KEY }} - - - name: Upload binary to GCP - id: upload_file - uses: "google-github-actions/upload-cloud-storage@v2" - with: - path: "target/release/native_blockifier.pypy39-pp73-x86_64-linux-gnu.so" - destination: "native_blockifier_artifacts/${{ env.SHORT_HASH }}/release/" - # Keep the name 'udeps' to match original action name, so we don't need to define specific branch # rules on Github for specific version branches. udeps: