Skip to content

ci: add machine-independent benchmark gate as CI step - #27

Merged
tr1v3r merged 2 commits into
masterfrom
ci/benchmark-gate
Sep 14, 2026
Merged

tr1v3r merged 2 commits into
masterfrom
ci/benchmark-gate

Conversation

@tr1v3r

@tr1v3r tr1v3r commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a machine-independent performance gate as an explicit CI step.

Design

TestBenchmarkGate locks the parallel-v2 acceptance criteria as in-process ratios (parallel vs serial on the same machine), so thresholds hold on any runner — absolute-time gates would be flaky by construction:

gate threshold v2 measured (local, 5 runs) catches
G1 near-free Parallel(4) overhead ≤ 4× serial 1.1–2.2× v1-style per-op-pool regression (was 14–21×)
G2 Ordered() overhead ≤ 6× serial 0.8–3.2× re-sequencer degradation (naive map was 8×)
G3 heavy-work speedup ≥ 1.5× 2.9–3.2× fusion failure (collapses to ~1×)
  • Best-of-3 timings with settled GC damp CI neighbor noise; each run ~1.6s
  • Skips under -race (detector instruments channel ops → skewed ratios) via build-tag const, and under -short
  • Dedicated "Benchmark gate" step in ci.yml for visibility; documented in AGENTS.md with a do-not-loosen-without-justification note

Housekeeping

  • Accidentally swept AgentTeams runtime state (.agent-teams/) removed from the first push and gitignored

Verification

  • 5/5 stable local gate runs; -race skip confirmed; gofmt/vet/lint 0 issues (unparam finding fixed); full -race suite green

TestBenchmarkGate locks the parallel-v2 acceptance criteria as ratio gates measured in-process: G1 near-free Parallel(4) <=4x serial (v2 ~1.1-2.2x; v1 regression was 14-21x), G2 Ordered <=6x serial (v2 ~1.2-3.2x), G3 heavy-work speedup >=1.5x (v2 ~3x). Best-of-3 timings with settled GC damp CI noise; thresholds are machine-independent because both sides of each ratio run on the same machine. Skips under -race (detector instruments channel ops) via build-tag const and under -short. Dedicated 'Benchmark gate' step in ci.yml for visibility; documented in AGENTS.md with a do-not-loosen-without-justification note. Verified: 5/5 stable local runs, race skip confirmed, lint 0 issues (unparam finding fixed), full suite green.
First CI run measured G1 at 4.19x (gate 4.0) on a shared runner while v2 is healthy: laptop-core and shared-CI scheduling spans 1.1-5.0x for the same code, so the healthy-v2 envelope is wider than the initial guess. G1 4.0->6.0, G2 6.0->8.0 (CI measured ordered 4.97x, leaving only 1.2x headroom at 6.0); G3 stays 1.5 (measured 3.0 on CI). Calibration table with both machines' data recorded in the gate file; regression signatures (v1 pools 14-21x, fusion failure ~1x speedup) remain far outside the bounds.
@tr1v3r
tr1v3r merged commit 16f9d42 into master Sep 14, 2026
2 checks passed
@tr1v3r
tr1v3r deleted the ci/benchmark-gate branch September 14, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant