forked from agntcy/slim
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (74 loc) · 2.25 KB
/
Copy pathbenchmark.yaml
File metadata and controls
82 lines (74 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# 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