chore: release #1333
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
| # Copyright AGNTCY Contributors (https://github.com/agntcy) | |
| # SPDX-License-Identifier: Apache-2.0 | |
| --- | |
| name: benchmark | |
| on: | |
| pull_request: | |
| paths: | |
| - '.github/workflows/benchmark.yaml' | |
| - 'crates/**' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - 'scripts/run-benchmark.sh' | |
| - 'scripts/flamegraph-profile.sh' | |
| workflow_dispatch: | |
| inputs: | |
| senders: | |
| description: 'Comma-separated sender counts' | |
| required: false | |
| default: '1,2,4,8' | |
| type: string | |
| messages: | |
| description: 'Messages per sender' | |
| required: false | |
| default: '1000000' | |
| type: string | |
| payload-sizes: | |
| description: 'Comma-separated payload sizes in bytes' | |
| required: false | |
| default: '8,16,64,256,1024,4096' | |
| type: string | |
| runs: | |
| description: 'Repetitions per configuration' | |
| required: false | |
| default: '3' | |
| type: string | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| benchmark: | |
| name: Data plane benchmark | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Rust | |
| uses: ./.github/actions/setup-rust | |
| - name: Run benchmark | |
| working-directory: . | |
| env: | |
| BENCH_SENDERS: ${{ inputs.senders || '1,2,4,8' }} | |
| BENCH_MESSAGES: ${{ inputs.messages || '500000' }} | |
| BENCH_PAYLOAD_SIZES: ${{ inputs.payload-sizes || '8,16,64,1024' }} | |
| BENCH_RUNS: ${{ inputs.runs || '1' }} | |
| run: | | |
| ./scripts/run-benchmark.sh \ | |
| --senders "$BENCH_SENDERS" \ | |
| --messages "$BENCH_MESSAGES" \ | |
| --payload-sizes "$BENCH_PAYLOAD_SIZES" \ | |
| --runs "$BENCH_RUNS" \ | |
| --output benchmark-results.csv | |
| - name: Upload results | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: benchmark-results-${{ github.sha }} | |
| path: benchmark-results.csv | |
| retention-days: 90 |