Skip to content

Commit 348ea4a

Browse files
committed
Add GitHub CI workflow for K8s benchmark validation
1 parent 2b4b2dd commit 348ea4a

2 files changed

Lines changed: 39 additions & 7 deletions

File tree

.github/workflows/k8s_benchmark.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ concurrency:
2323

2424
on:
2525
pull_request:
26-
paths:
27-
- "native/**/*.rs"
28-
- "spark/**/*.scala"
29-
- "spark/**/*.java"
26+
# paths:
27+
# - "native/**/*.rs"
28+
# - "spark/**/*.scala"
29+
# - "spark/**/*.java"
3030
workflow_dispatch:
3131
inputs:
3232
scale_factor:

benchmarks/README.md

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,42 @@ specific language governing permissions and limitations
1717
under the License.
1818
-->
1919

20-
# Running Comet Benchmarks in Microk8s
20+
# Comet Benchmarks
2121

22-
This guide explains how to run benchmarks derived from TPC-H and TPC-DS in Apache DataFusion Comet deployed in a
23-
local Microk8s cluster.
22+
## GitHub CI (Kind)
23+
24+
The CI runs TPC-H benchmarks on Kind cluster for PRs modifying `native/**/*.rs` or `spark/**/*.scala|java`.
25+
Target: Comet >= 1.1x speedup over Spark.
26+
27+
## Local Development (Kind)
28+
29+
```bash
30+
# Setup
31+
./hack/k8s-benchmark-setup.sh
32+
33+
# Build
34+
make release PROFILES="-Pspark-3.5 -Pscala-2.12"
35+
docker build -t comet-bench:local -f benchmarks/Dockerfile.k8s .
36+
kind load docker-image comet-bench:local --name comet-bench
37+
38+
# Generate data
39+
./benchmarks/scripts/generate-tpch-data.sh 1
40+
41+
# Run benchmarks
42+
./benchmarks/scripts/run-k8s-benchmark.sh spark q1
43+
./benchmarks/scripts/run-k8s-benchmark.sh comet q1
44+
45+
# Compare
46+
python3 benchmarks/scripts/compare-results.py \
47+
--spark /tmp/comet-bench-results/spark_q1_result.json \
48+
--comet /tmp/comet-bench-results/comet_q1_result.json \
49+
--min-speedup 1.1
50+
51+
# Cleanup
52+
./hack/k8s-benchmark-setup.sh --delete
53+
```
54+
55+
## Microk8s Deployment
2456

2557
## Use Microk8s locally
2658

0 commit comments

Comments
 (0)