ci: add machine-independent benchmark gate as CI step - #27
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a machine-independent performance gate as an explicit CI step.
Design
TestBenchmarkGatelocks 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:Parallel(4)overheadOrdered()overhead-race(detector instruments channel ops → skewed ratios) via build-tag const, and under-shortHousekeeping
.agent-teams/) removed from the first push and gitignoredVerification
-raceskip confirmed; gofmt/vet/lint 0 issues (unparam finding fixed); full-racesuite green