Skip to content

Commit ffe6dd4

Browse files
committed
ci: slim to minimal benchmark pipeline; add cross-platform report runner and GH Actions; fix Markdown formatting
1 parent 4f5783e commit ffe6dd4

10 files changed

Lines changed: 342 additions & 591 deletions

File tree

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: HarborX Benchmarks
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "scripts/**"
8+
- "requirements.txt"
9+
workflow_dispatch: {}
10+
11+
jobs:
12+
bench:
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, windows-latest]
16+
runs-on: ${{ matrix.os }}
17+
18+
env:
19+
ROWS: 500000
20+
PARTS: 16
21+
UPDATE_RATIO: "0.5"
22+
WORKERS: 4
23+
CHUNK: 200000
24+
WINDOWS: 1,4,16,64
25+
OUT_MD: report_windows.md
26+
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- uses: actions/setup-python@v5
31+
with:
32+
python-version: "3.11"
33+
cache: "pip"
34+
35+
- name: Install deps
36+
run: pip install -r requirements.txt
37+
38+
# Unix/macOS
39+
- name: Run benchmark (Unix)
40+
if: runner.os != 'Windows'
41+
shell: bash
42+
run: |
43+
chmod +x scripts/report_unix.sh
44+
./scripts/report_unix.sh
45+
46+
# Windows
47+
- name: Run benchmark (Windows)
48+
if: runner.os == 'Windows'
49+
shell: pwsh
50+
run: |
51+
python scripts/report.py `
52+
--rows $env:ROWS `
53+
--parts $env:PARTS `
54+
--update-ratio $env:UPDATE_RATIO `
55+
--workers $env:WORKERS `
56+
--chunk $env:CHUNK `
57+
--windows $env:WINDOWS `
58+
--out $env:OUT_MD `
59+
--no-exact
60+
61+
- name: Publish run summary
62+
if: always()
63+
shell: bash
64+
run: |
65+
echo "# HarborX Window-Size Benchmark" >> "$GITHUB_STEP_SUMMARY"
66+
if [ -f "$OUT_MD" ]; then
67+
cat "$OUT_MD" >> "$GITHUB_STEP_SUMMARY"
68+
fi
69+
70+
- name: Upload artifacts
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: harborx-benchmark-${{ matrix.os }}
74+
path: |
75+
report_windows.md
76+
if-no-files-found: warn

report_windows.md

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,22 @@
44
Update ratio: **0.50** → keyspace≈**4,000,000**
55
- Workers: **4**, chunk: **200,000**
66

7-
- Arrow write (all parts): **36.338s**, SQLite append (all parts): **79.344s**
7+
- Arrow write (all parts): **19.859s**, SQLite append (all parts): **77.029s**
88

99
## Window W = 1
10-
11-
| Path | Compact (base) | Live query | TTF (base+live) |
12-
|--------|---------------:|-----------:|----------------:|
13-
| Arrow | 10.115s| 0.621s| **10.736s** |
14-
| SQLite | 47.790s| 5.065s| **52.855s** |
10+
| Path | Compact (base) | Live query | TTF (base+live) |
11+
|---|---:|---:|---:|
12+
| Arrow | 9.783s | 0.514s | **10.297s** |
13+
| SQLite | 43.546s | 5.201s | **48.747s** |
1514

1615
## Window W = 4
17-
18-
| Path | Compact (base) | Live query | TTF (base+live) |
19-
|--------|---------------:|-----------:|----------------:|
20-
| Arrow | 10.643s| 0.868s| **11.511s** |
21-
| SQLite | 32.504s| 10.941s| **43.445s** |
16+
| Path | Compact (base) | Live query | TTF (base+live) |
17+
|---|---:|---:|---:|
18+
| Arrow | 8.643s | 0.890s | **9.533s** |
19+
| SQLite | 33.498s | 11.055s | **44.552s** |
2220

2321
## Window W = 16
24-
25-
| Path | Compact (base) | Live query | TTF (base+live) |
26-
|--------|---------------:|-----------:|----------------:|
27-
| Arrow | 1.329s| 3.202s| **4.531s** |
28-
| SQLite | 3.081s| 34.356s| **37.438s** |
22+
| Path | Compact (base) | Live query | TTF (base+live) |
23+
|---|---:|---:|---:|
24+
| Arrow | 0.513s | 3.457s | **3.970s** |
25+
| SQLite | 4.269s | 36.765s | **41.034s** |

scripts/bench_upd_sweep.py

Lines changed: 0 additions & 78 deletions
This file was deleted.

scripts/bench_updates_par.py

Lines changed: 0 additions & 99 deletions
This file was deleted.

scripts/bench_win_sweep.bat

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)