Skip to content

perf(ci): fit the reconciler micro-suite inside its per-side budget - #700

Merged
Alexandre Zollinger Chohfi (azchohfi) merged 1 commit into
mainfrom
perf-micro-fit-budget
Jun 26, 2026
Merged

Alexandre Zollinger Chohfi (azchohfi) merged 1 commit into
mainfrom
perf-micro-fit-budget

Conversation

@azchohfi

Copy link
Copy Markdown
Collaborator

What & why

The 16-bench PerfBench.ControlModel reconciler micro-suite has been silently absent from every /perf comment since it first shipped. Root-caused during the #692 acceptance-run validation (run 28235303559): at --MicroIterations 10000 the suite runs ~3× over the 420 s per-side timeout, completing only M1–M4 of 16 benches on each side. Invoke-MicroRun correctly discards a truncated prefix (it can't compare a silent subset), so the micro section never rendered — on main or PR.

This is a capacity bug, not a logic bug: the parse/compare path is fine (verified locally against the partial micro-*.jsonl from the #692 artifact). The suite just never finishes.

The fix (pure capacity knobs)

  • --MicroIterations default 10000 → 1000. Every bench runs ≥120 µs/op — the heaviest (M7–M9) reconcile a 1000-node tree per op. At 1000 iterations each per-rep mean stays ≥120 ms, i.e. hundreds of thousands of times the Stopwatch floor, so per-op ns resolution is unchanged and alloc/op is byte-exact regardless of iteration count (GC.GetAllocatedBytesForCurrentThread, per-thread). The empirical anchor: M1–M4 alone consumed the full 420 s at 10000; a 10× cut brings the whole 16-bench suite comfortably inside budget.
  • Per-side timeout 420 → 600 s for thermal headroom on a busy shared runner (M4's mean ns rose ~2× across 12 reps from thermal drift). A genuine hang is still bounded; total workflow time stays well under the 75-min cap.
  • MicroReps = 12 unchanged — the paired-CI sample count (and thus the alloc CI width) is preserved.

Footprint / gate

  • 2 files, both tests/stress_perf/ci/** — 0 src/Reactor. Class-B harness-only.
  • RunPerfBenchmark.Tests.ps1 locks the new defaults + the 600 s timeout (43 assertions green).
  • PerfLib.Tests.ps1 unaffected (218 green).
  • This restores the (alloc-flagged, ns-informational) micro section. The rep-level interleaving that promotes ns to flaggable is the greenlit follow-up (kept separate so this urgent restore isn't held behind the larger change; ns auto-flag stays dormant there per coordinator policy).

Validation note

Can't build the WinUI/PerfBench exes on the ARM64+OneDrive dev box, so the end-to-end "micro section returns" check is via a CI /perf run. Held as DRAFT pending coordinator review + merge press.

Co-authored-by: Copilot [email protected]

The 16-bench PerfBench.ControlModel micro-suite was silently dropped from every
/perf comment: at --iterations 10000 it ran ~3x over the 420s per-side timeout
(completing only M1-M4), so Invoke-MicroRun discarded the truncated prefix and
the micro section never rendered (regressed since the suite first shipped).

Every bench runs >=120 us/op -- the heaviest (M7-M9) reconcile a 1000-node tree
per op -- so per-op resolution stays hundreds of thousands of times above the
Stopwatch floor even at far fewer iterations. Cut the inner-iteration default
10000 -> 1000 (alloc/op is exact regardless; each per-rep mean stays >=120 ms)
and raise the per-side timeout 420 -> 600s for thermal headroom on a busy shared
runner. Paired-CI sample count (MicroReps=12) is unchanged.

Tests: lock the new -MicroIterations/-MicroReps defaults + the 600s timeout in
RunPerfBenchmark.Tests.ps1. Docs: sync the -MicroIterations default in the ci
README param table and clarify the suite is 16 benches (M1-M13 + 3 supplementary).

Co-authored-by: Copilot <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a capacity/configuration issue in the /perf CI harness by resizing the reconciler micro-benchmark suite so it reliably completes within the per-side budget and therefore renders in /perf comments again.

Changes:

  • Reduce -MicroIterations default from 10000 to 1000 for PerfBench.ControlModel micro runs.
  • Increase the per-side micro-suite timeout in Invoke-MicroRun from 420s to 600s for headroom on shared runners.
  • Add/adjust CI-side PowerShell tests and README documentation to lock and describe the new defaults.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
tests/stress_perf/ci/RunPerfBenchmark.Tests.ps1 Adds assertions to lock MicroIterations=1000, MicroReps=12, and Invoke-MicroRun timeout 600s.
tests/stress_perf/ci/Run-PerfBenchmark.ps1 Updates micro-suite defaults and increases the per-side timeout; expands inline rationale in help/comments.
tests/stress_perf/ci/README.md Updates the documented default for -MicroIterations to 1000 with a brief rationale.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants