benchmarks & trials

Measured numbers, including the cases that will not balance.

Predicted load balance and actual CI wall time are two different numbers. Setup costs, indivisible slow files, runner hardware differences, and queue delays all show up in real runs. Both are reported separately below.

Before & after Switch suites

Interactive before-and-after comparison

1 machine → count split 8m 10s → 4m 15s
with Bunpō timings 2m 08s slowest shard
time saved 6m 02s saved (3.84x faster)
113 pytest files · 2,777 tests · PostgreSQL 16 · 4 machines 2m 07s faster than splitting by count · spread cut from 179.5s to 7.3s

Round 1 · split by count

slowest 4m 15s · 179.5s spread

Machine 0 (29 files ) 1m 16s
Machine 1 (28 files ) 1m 15s
Machine 2 (28 files · 131s WS file) 4m 15s
Machine 3 (28 files ) 1m 42s

Round 2 · Bunpō timed split

slowest 2m 08s · 7.3s spread

Machine 0 (1 file · 131s WS alone) 2m 08s
Machine 1 (36 files ) 2m 02s
Machine 2 (40 files ) 2m 06s
Machine 3 (36 files ) 2m 00s

3.84x faster than 1 machine (8m 10s to 2m 08s). Spread dropped from 179.5 s to 7.3 s. Dashed line marks the slowest count-split machine (4m 15s).

Local 4-CPU-pinned trial, serial pytest --use-postgres. Each shard runs its own Postgres testcontainer. Test-command wall time only; CI checkout and dependency install are extra.

Live CI trial LaTabdhir · GitHub Actions

Playwright E2E on two self-hosted runners (v0.0.5)

An outside maintainer wired nuggocto/bunpo@v0 into .github/workflows/e2e.yml from the Playwright guide alone: 68 specs, 232 cases, Docker Compose per runner, across one x64 runner and one ARM64 runner.

Run Slowest browser job Verify + merge Workflow elapsed (incl. queue)
Single machine (ARM64 baseline) 19m 12s — 19m 47s
Cold (2 machines, by count) 8m 46s 17s 9m 58s (49.6% shorter)
Warm (2 machines, timed 4m42s / 4m42s) 7m 32s 16s 17m 49s (13m 09s x64 queue delay)

In the warm run, Bunpō predicted 4m42s on both shards; actual Playwright wall was 3m 32s on x64 vs 6m 29s on ARM64, and another CI job queued x64 for 13m 09s. Static file-level splitting assumes similar machines starting together.

Local trials 7 real suites · 4 CPUs each

Production suites on LaTabdhir and Majlisna

Each machine ran alone pinned with taskset to 4 CPUs to eliminate host contention, measuring test-command wall time (excluding CI checkout and dependency install). Every round ran the exact same test count as baseline with verify and merge exiting 0.

Suite Runner 1 machine 4 machines (count) 4 machines (timed R2 / R3) Speedup
LaTabdhir Postgres parity pytest (495 files) 25m 30s 6m 36s (54.5s spread) 6m 16s / 6m 19s (5.4s / 10.3s) 4.0x
LaTabdhir backend SQLite pytest -n 4 (495 files) 3m 42s 1m 27s (20.3s spread) 1m 01s / 1m 03s (2.6s / 5.7s) 3.6x
LaTabdhir front Vitest full-cost (294 files) 2m 03s 37.6s (5.8s spread) 34.3s / 36.6s (1.7s / 2.4s) 3.4x
LaTabdhir E2E Playwright workers: 1 (68 specs) 5m 09s 3m 09s (113.9s spread, 1 flake) 1m 34s–1m 43s clean (2m 45s / 2m 24s w/ flake) ~3.0x clean
Majlisna backend Postgres pytest (113 files) 8m 10s 4m 15s (179.5s spread) 2m 08s / 2m 13s (7.3s / 11.1s) 3.8x
Majlisna E2E (17 projects) Playwright (70 specs) 6m 14s 3m 28s (140.6s spread) 3m 28s (floored by 190s WS spec) 1.8x
Majlisna front Vitest full-cost (151 files) 24.7s 7.8s (1.08s spread) 7.8s / 7.7s (0.56s / 0.32s) 3.2x
Synthetic suite docs/benchmark.md

Declared benchmark, tight split, and indivisible file

Run with real pytest processes on 4 parallel machines (fixed pytest startup: 134 ms per machine). The declared target is predicted slowest / fastest ≤ 1.10 on the Many files suite.

Suite Shape Predicted ratio (R3) Wall ratio (R3) Slowest wall (R3)
Many files 40 files, 100–900 ms 1.021 1.028 5,042 ms
Tight 13 files with exact 3s optimal split 1.104 1.104 3,392 ms
Indivisible One 6,000 ms file + twelve 500 ms files 2.995 2.839 6,174 ms

Longest-first dealing guarantees a makespan within 4/3 of optimal, not an exact partition search: the Tight suite shows the gap, and Indivisible shows why bunpo split warns when one file exceeds the average machine load.

Overhead & limits Binary, split speed, bounds

31 ms to split 50,000 tests across 256 machines

Bunpō runs on every machine on every build, so startup, split speed, and binary size stay small. Measured on the Go benchmark suite, the v0.0.6 release binaries, and the live GitHub Actions trial:

Metric Workload / scope Measured value
BenchmarkSplit 50,000 tests, 256 machines (budget: < 1 s) ~31 ms (403 allocs)
verify + merge CI job Live GitHub Actions (LaTabdhir, 68 specs, incl. checkout & artifacts) 16–17 s total
Release binary size (v0.0.6) Static binary, Go stdlib only (linux/amd64) 3.2 MiB (3.1–3.5 MB across targets)
Input & report caps timings.json, manifests, JUnit XML, stdin list 64 MiB per file · 32 XML depth · 2M tokens