@@ -20,7 +20,8 @@ permissions:
2020jobs :
2121 benchmark :
2222 if : |
23- github.event.action == 'labeled' && github.event.label.name == 'run-benchmark' &&
23+ github.event.action == 'labeled' &&
24+ (github.event.label.name == 'run-benchmark' || github.event.label.name == 'run-cluster-benchmark') &&
2425 github.repository == 'valkey-io/valkey'
2526
2627 runs-on : ["self-hosted", "ec2-al-2023-pr-benchmarking-arm64"]
8687 echo "VALKEY_BENCHMARK_PATH=$VALKEY_BENCHMARK_PATH" >> $GITHUB_ENV
8788 echo "Latest valkey-benchmark path: $VALKEY_BENCHMARK_PATH"
8889
90+ - name : Enable cluster mode in benchmark config
91+ working-directory : valkey-perf-benchmark
92+ if : github.event.label.name == 'run-cluster-benchmark'
93+ run : |
94+ CONFIG_FILE="../valkey/.github/benchmark_configs/benchmark-config-arm.json"
95+ sed -i 's/"cluster_mode": false/"cluster_mode": true/g' "$CONFIG_FILE"
96+ echo "Updated config for cluster mode:"
97+ cat "$CONFIG_FILE"
98+
8999 - name : Run benchmarks
90100 working-directory : valkey-perf-benchmark
91101 run : |
@@ -120,7 +130,7 @@ jobs:
120130 continue-on-error : true
121131 uses : actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
122132 with :
123- name : benchmark -results
133+ name : ${{ github.event.label.name }} -results
124134 path : |
125135 ./valkey-perf-benchmark/results/${{ github.event.pull_request.merge_commit_sha }}/metrics.json
126136 ./valkey-perf-benchmark/results/${{ github.event.pull_request.base.ref }}/metrics.json
@@ -137,11 +147,13 @@ jobs:
137147 const sha = '${{ github.event.pull_request.head.sha }}';
138148 const short = sha.slice(0,7);
139149 const link = `[\`${short}\`](https://github.com/${owner}/${repo}/commit/${sha})`
150+ const label = '${{ github.event.label.name }}';
151+ const prefix = label === 'run-cluster-benchmark' ? 'Cluster Benchmark' : 'Benchmark';
140152 await github.rest.issues.createComment({
141153 issue_number: context.issue.number,
142154 owner,
143155 repo,
144- body: `**Benchmark ran on this commit:** ${link}\n\n${body}`
156+ body: `**${prefix} ran on this commit:** ${link}\n\n${body}`
145157 });
146158
147159 - name : Cleanup any running valkey processes
@@ -160,7 +172,7 @@ jobs:
160172 fi
161173
162174 - name : Remove ${{ github.event.label.name }} label
163- if : always() && github.event.label.name == 'run-benchmark'
175+ if : always() && ( github.event.label.name == 'run-benchmark' || github.event.label.name == 'run-cluster-benchmark')
164176 uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
165177 with :
166178 github-token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments