Fix: reset metrics properly #102
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Execution benchmarks" | |
| on: | |
| workflow_call: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| types: [opened, synchronize, reopened, labeled] | |
| branches: ["**"] | |
| paths: | |
| - "benchmarks/execute/**" | |
| - "crates/circuits/**" | |
| - "crates/toolchain/**" | |
| - "crates/prof/**" | |
| - "crates/sdk/**" | |
| - "crates/vm/**" | |
| - "extensions/**" | |
| - "Cargo.toml" | |
| - ".github/workflows/benchmarks-execute.yml" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow_ref }}-benchmarks-execute-${{ github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| S3_FIXTURES_PATH: s3://openvm-public-data-sandbox-us-east-1/benchmark/fixtures | |
| JEMALLOC_SYS_WITH_MALLOC_CONF: "retain:true,background_thread:true,metadata_thp:always,thp:always,dirty_decay_ms:10000,muzzy_decay_ms:10000,abort_conf:true" | |
| TOOLCHAIN: "+nightly-2025-08-19" | |
| jobs: | |
| codspeed-walltime-benchmarks: | |
| name: Run codspeed walltime benchmarks | |
| runs-on: | |
| - runs-on=${{ github.run_id }} | |
| - family=m5a.xlarge # 2.5Ghz clock speed | |
| - image=ubuntu24-full-x64 | |
| - extras=s3-cache | |
| env: | |
| CODSPEED_RUNNER_MODE: walltime | |
| steps: | |
| - uses: runs-on/action@v2 | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Install architecture specific tools | |
| run: | | |
| source ci/scripts/utils.sh | |
| install_s5cmd | |
| - name: Pull fixtures from S3 | |
| run: | | |
| mkdir -p benchmarks/fixtures | |
| s5cmd cp "${{ env.S3_FIXTURES_PATH }}/*" benchmarks/fixtures/ || echo "No fixtures found in S3" | |
| - name: Install cargo-binstall | |
| uses: cargo-bins/cargo-binstall@main | |
| - name: Install codspeed | |
| run: cargo binstall --no-confirm --force cargo-codspeed | |
| - name: Build benchmarks | |
| working-directory: benchmarks/execute | |
| run: cargo $TOOLCHAIN codspeed build --profile maxperf --features tco | |
| - name: Run benchmarks | |
| uses: CodSpeedHQ/action@v3 | |
| with: | |
| working-directory: benchmarks/execute | |
| run: cargo $TOOLCHAIN codspeed run | |
| token: ${{ secrets.CODSPEED_TOKEN }} | |
| codspeed-instrumentation-benchmarks: | |
| name: Run codspeed instrumentation benchmarks | |
| runs-on: | |
| - runs-on=${{ github.run_id }}/family=m5a.xlarge/image=ubuntu24-full-x64/extras=s3-cache | |
| if: github.event_name != 'pull_request' | |
| env: | |
| CODSPEED_RUNNER_MODE: instrumentation | |
| steps: | |
| - uses: runs-on/action@v2 | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Install architecture specific tools | |
| run: | | |
| source ci/scripts/utils.sh | |
| install_s5cmd | |
| - name: Pull fixtures from S3 | |
| run: | | |
| mkdir -p benchmarks/fixtures | |
| s5cmd cp "${{ env.S3_FIXTURES_PATH }}/*" benchmarks/fixtures/ || echo "No fixtures found in S3" | |
| - name: Install cargo-binstall | |
| uses: cargo-bins/cargo-binstall@main | |
| - name: Install codspeed | |
| run: cargo binstall --no-confirm --force cargo-codspeed | |
| - name: Build benchmarks | |
| working-directory: benchmarks/execute | |
| run: cargo $TOOLCHAIN codspeed build --features tco | |
| - name: Run benchmarks | |
| uses: CodSpeedHQ/action@v3 | |
| with: | |
| working-directory: benchmarks/execute | |
| run: cargo $TOOLCHAIN codspeed run | |
| token: ${{ secrets.CODSPEED_TOKEN }} |