Skip to content

Commit 29df518

Browse files
committed
Merge remote-tracking branch 'origin/develop' into dk/continuous-s3-benchmarking
2 parents 78204e9 + eb42e8d commit 29df518

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1648
-1207
lines changed

.github/workflows/bench-pr.yml

+34-136
Original file line numberDiff line numberDiff line change
@@ -23,41 +23,47 @@ jobs:
2323
labels: benchmark
2424

2525
codspeed_bench:
26-
name: Run Criterion benchmarks with Codspeed
26+
name: Benchmark with Codspeed
2727
needs: label_trigger
28-
runs-on: ubuntu-latest
28+
runs-on: ubuntu-latest-large
2929
steps:
3030
- uses: actions/checkout@v4
31-
- uses: ./.github/actions/cleanup
3231
- uses: ./.github/actions/setup-rust
3332

3433
- name: Install Codspeed
3534
shell: bash
3635
run: cargo install --force cargo-codspeed --locked
3736

38-
- name: Build benchmark targets
37+
- name: Build benchmarks
3938
env:
4039
RUSTFLAGS: "-C target-cpu=native"
4140
# We want to run micro-benchmarks with release profile.
4241
# 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
4654
uses: CodSpeedHQ/action@v3
4755
with:
4856
run: cargo codspeed run
4957
token: ${{ secrets.CODSPEED_TOKEN }}
5058

51-
bench:
59+
bench-criterion:
5260
needs: label_trigger
5361
strategy:
5462
matrix:
5563
benchmark:
56-
- id: random_access
57-
name: Random Access
5864
- id: compress
5965
name: Vortex Compression
60-
runs-on: [self-hosted, gcp]
66+
runs-on: [ self-hosted, gcp ]
6167
if: ${{ contains(github.event.head_commit.message, '[benchmark]') || github.event.label.name == 'benchmark' && github.event_name == 'pull_request' }}
6268
steps:
6369
- uses: actions/checkout@v4
@@ -125,9 +131,15 @@ jobs:
125131
with:
126132
file-path: comment.md
127133
comment-tag: bench-pr-comment-${{ matrix.benchmark.id }}
128-
tpch-s3:
134+
bench:
129135
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' }}
131143
steps:
132144
- uses: actions/checkout@v4
133145
- uses: ./.github/actions/cleanup
@@ -144,75 +156,14 @@ jobs:
144156
run: |
145157
echo "TMPDIR=/work" >> $GITHUB_ENV
146158
147-
- name: Run TPC-H benchmark
159+
- name: Run benchmark
148160
shell: bash
149161
env:
150162
BENCH_VORTEX_RATIOS: '.*'
151163
RUSTFLAGS: '-C target-cpu=native'
152164
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-
uses: opt-nc/[email protected]
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
208166
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
216167
- name: Setup AWS CLI
217168
uses: aws-actions/configure-aws-credentials@v4
218169
with:
@@ -231,73 +182,20 @@ jobs:
231182
| grep $base_commit_sha \
232183
> base.json
233184
234-
echo '# Benchmarks: TPC-H on NVME' > comment.md
185+
echo '# Benchmarks: ${{ matrix.benchmark.id }}' > comment.md
235186
echo '<details>' >> comment.md
236187
echo '<summary>Table of Results</summary>' >> comment.md
237188
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 \
239190
>> comment.md
240191
echo '</details>' >> comment.md
241192
- name: Comment PR
242193
uses: thollander/actions-comment-pull-request@v3
243194
with:
244195
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:
247198
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-
uses: opt-nc/[email protected]
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

Comments
 (0)