@@ -23,41 +23,47 @@ jobs:
23
23
labels : benchmark
24
24
25
25
codspeed_bench :
26
- name : Run Criterion benchmarks with Codspeed
26
+ name : Benchmark with Codspeed
27
27
needs : label_trigger
28
- runs-on : ubuntu-latest
28
+ runs-on : ubuntu-latest-large
29
29
steps :
30
30
- uses : actions/checkout@v4
31
- - uses : ./.github/actions/cleanup
32
31
- uses : ./.github/actions/setup-rust
33
32
34
33
- name : Install Codspeed
35
34
shell : bash
36
35
run : cargo install --force cargo-codspeed --locked
37
36
38
- - name : Build benchmark targets
37
+ - name : Build benchmarks
39
38
env :
40
39
RUSTFLAGS : " -C target-cpu=native"
41
40
# We want to run micro-benchmarks with release profile.
42
41
# We run with all features since we feature gate bench utils.
43
- run : cargo codspeed build --features test-harness --exclude bench-vortex --workspace --profile release
44
-
45
- - name : Run the benchmarks
42
+ run : |
43
+ cargo codspeed build --features test-harness \
44
+ --exclude bench-vortex \
45
+ --exclude vortex-datafusion \
46
+ --exclude vortex-tui \
47
+ --exclude vortex-fuzz \
48
+ --exclude pyvortex \
49
+ --exclude xtask \
50
+ --workspace \
51
+ --profile release
52
+
53
+ - name : Run benchmarks
46
54
uses : CodSpeedHQ/action@v3
47
55
with :
48
56
run : cargo codspeed run
49
57
token : ${{ secrets.CODSPEED_TOKEN }}
50
58
51
- bench :
59
+ bench-criterion :
52
60
needs : label_trigger
53
61
strategy :
54
62
matrix :
55
63
benchmark :
56
- - id : random_access
57
- name : Random Access
58
64
- id : compress
59
65
name : Vortex Compression
60
- runs-on : [self-hosted, gcp]
66
+ runs-on : [ self-hosted, gcp ]
61
67
if : ${{ contains(github.event.head_commit.message, '[benchmark]') || github.event.label.name == 'benchmark' && github.event_name == 'pull_request' }}
62
68
steps :
63
69
- uses : actions/checkout@v4
@@ -125,9 +131,15 @@ jobs:
125
131
with :
126
132
file-path : comment.md
127
133
comment-tag : bench-pr-comment-${{ matrix.benchmark.id }}
128
- tpch-s3 :
134
+ bench :
129
135
needs : label_trigger
130
- runs-on : [self-hosted, aws]
136
+ runs-on : [ self-hosted, gcp ]
137
+ strategy :
138
+ matrix :
139
+ benchmark :
140
+ - id : random_access
141
+ name : Random Access
142
+ if : ${{ contains(github.event.head_commit.message, '[benchmark]') || github.event.label.name == 'benchmark' && github.event_name == 'pull_request' }}
131
143
steps :
132
144
- uses : actions/checkout@v4
133
145
- uses : ./.github/actions/cleanup
@@ -144,75 +156,14 @@ jobs:
144
156
run : |
145
157
echo "TMPDIR=/work" >> $GITHUB_ENV
146
158
147
- - name : Run TPC-H benchmark
159
+ - name : Run benchmark
148
160
shell : bash
149
161
env :
150
162
BENCH_VORTEX_RATIOS : ' .*'
151
163
RUSTFLAGS : ' -C target-cpu=native'
152
164
run : |
153
- cargo run --bin tpch_benchmark --release -- \
154
- --use-remote-data-dir s3://vortex-bench-dev/tpch-sf1/ \
155
- --exclude-queries 15 \
156
- --formats 'parquet,vortex' \
157
- -d gh-json \
158
- -t 1 \
159
- | tee tpch.json
160
- - name : Setup AWS CLI
161
- uses : aws-actions/configure-aws-credentials@v4
162
- with :
163
- role-to-assume : arn:aws:iam::375504701696:role/GitHubBenchmarkRole
164
- aws-region : us-east-1
165
- - name : Install uv
166
- uses : astral-sh/setup-uv@v5
167
- - name : Compare results
168
- shell : bash
169
- run : |
170
- set -Eeu -o pipefail -x
171
-
172
- base_commit_sha=${{ github.event.pull_request.base.sha }}
173
-
174
- aws s3 cp s3://vortex-benchmark-results-database/data.json - \
175
- | grep $base_commit_sha \
176
- > base.json
177
-
178
- echo '# Benchmarks: TPC-H on S3' > comment.md
179
- echo '<details>' >> comment.md
180
- echo '<summary>Table of Results</summary>' >> comment.md
181
- echo '' >> comment.md
182
- uv run python3 scripts/compare-benchmark-jsons.py base.json tpch.json \
183
- >> comment.md
184
- echo '</details>' >> comment.md
185
- - name : Comment PR
186
- uses : thollander/actions-comment-pull-request@v3
187
- with :
188
- file-path : comment.md
189
- comment-tag : bench-pr-comment-tpch-s3
190
- tpch-nvme :
191
- needs : label_trigger
192
- runs-on : [self-hosted, gcp]
193
- steps :
194
- - uses : actions/checkout@v4
195
- - uses : ./.github/actions/cleanup
196
- - uses : ./.github/actions/setup-rust
197
- # The compression benchmarks rely on DuckDB being installed to convert CSV to Parquet
198
- - name : Install DuckDB
199
-
200
- if : runner.environment != 'self-hosted'
201
- with :
202
- version : v1.0.0
203
-
204
- - name : Set tempdir
205
- if : runner.environment == 'self-hosted'
206
- run : |
207
- echo "TMPDIR=/work" >> $GITHUB_ENV
165
+ cargo run --bin ${{ matrix.benchmark.id }} --release -- -d gh-json -t 1 | tee ${{ matrix.benchmark.id }}.json
208
166
209
- - name : Run TPC-H benchmark
210
- shell : bash
211
- env :
212
- BENCH_VORTEX_RATIOS : ' .*'
213
- RUSTFLAGS : ' -C target-cpu=native'
214
- run : |
215
- cargo run --bin tpch_benchmark --release -- -d gh-json -t 1 | tee tpch.json
216
167
- name : Setup AWS CLI
217
168
uses : aws-actions/configure-aws-credentials@v4
218
169
with :
@@ -231,73 +182,20 @@ jobs:
231
182
| grep $base_commit_sha \
232
183
> base.json
233
184
234
- echo '# Benchmarks: TPC-H on NVME ' > comment.md
185
+ echo '# Benchmarks: ${{ matrix.benchmark.id }} ' > comment.md
235
186
echo '<details>' >> comment.md
236
187
echo '<summary>Table of Results</summary>' >> comment.md
237
188
echo '' >> comment.md
238
- uv run python3 scripts/compare-benchmark-jsons.py base.json tpch .json \
189
+ uv run scripts/compare-benchmark-jsons.py base.json ${{ matrix.benchmark.id }} .json \
239
190
>> comment.md
240
191
echo '</details>' >> comment.md
241
192
- name : Comment PR
242
193
uses : thollander/actions-comment-pull-request@v3
243
194
with :
244
195
file-path : comment.md
245
- comment-tag : bench-pr-comment-tpch-nvme
246
- clickbench-nvme :
196
+ comment-tag : bench-pr-comment-${{ matrix.benchmark.id }}
197
+ sql :
247
198
needs : label_trigger
248
- runs-on : [self-hosted, gcp]
249
- steps :
250
- - uses : actions/checkout@v4
251
- - uses : ./.github/actions/cleanup
252
- - uses : ./.github/actions/setup-rust
253
-
254
- # The compression benchmarks rely on DuckDB being installed to convert CSV to Parquet
255
- - name : Install DuckDB
256
-
257
- if : runner.environment != 'self-hosted'
258
- with :
259
- version : v1.0.0
260
-
261
- - name : Set tempdir
262
- if : runner.environment == 'self-hosted'
263
- run : |
264
- echo "TMPDIR=/work" >> $GITHUB_ENV
265
-
266
- - name : Run Clickbench benchmark
267
- shell : bash
268
- env :
269
- BENCH_VORTEX_RATIOS : ' .*'
270
- RUSTFLAGS : ' -C target-cpu=native'
271
- HOME : /home/ci-runner
272
- run : |
273
- cargo run --bin clickbench --release -- -d gh-json | tee clickbench.json
274
- - name : Setup AWS CLI
275
- uses : aws-actions/configure-aws-credentials@v4
276
- with :
277
- role-to-assume : arn:aws:iam::375504701696:role/GitHubBenchmarkRole
278
- aws-region : us-east-1
279
- - name : Install uv
280
- uses : astral-sh/setup-uv@v5
281
- - name : Compare results
282
- shell : bash
283
- run : |
284
- set -Eeu -o pipefail -x
285
-
286
- base_commit_sha=${{ github.event.pull_request.base.sha }}
287
-
288
- aws s3 cp s3://vortex-benchmark-results-database/data.json - \
289
- | grep $base_commit_sha \
290
- > base.json
291
-
292
- echo '# Benchmarks: Clickbench on NVME' > comment.md
293
- echo '<details>' >> comment.md
294
- echo '<summary>Table of Results</summary>' >> comment.md
295
- echo '' >> comment.md
296
- uv run scripts/compare-benchmark-jsons.py base.json clickbench.json \
297
- >> comment.md
298
- echo '</details>' >> comment.md
299
- - name : Comment PR
300
- uses : thollander/actions-comment-pull-request@v3
301
- with :
302
- file-path : comment.md
303
- comment-tag : bench-pr-comment-clickbench-nvme
199
+ uses : ./.github/workflows/sql-benchmarks.yml
200
+ with :
201
+ mode : ' pr'
0 commit comments