Use the PowerShell runner at scripts/run_perf_loop.ps1 to capture a full local optimization cycle with stable artifacts under target/perf-loops/.
Initial pass:
powershell -ExecutionPolicy Bypass -File .\scripts\run_perf_loop.ps1 -CycleLabel rpc-pass-01After making the optimization change, resume from the verification half of the same cycle:
powershell -ExecutionPolicy Bypass -File .\scripts\run_perf_loop.ps1 -CycleLabel rpc-pass-01 -ResumeFromOptimizeDry-run orchestration without invoking cargo or python:
powershell -ExecutionPolicy Bypass -File .\scripts\run_perf_loop.ps1 -CycleLabel smoke-check -DryRunOptional benchmark filter:
powershell -ExecutionPolicy Bypass -File .\scripts\run_perf_loop.ps1 -CycleLabel queue-pass-01 -BenchFilter tier3_system_queueEach cycle writes to target/perf-loops/<cycle-label>/:
manifest.json: phase status, commands, snapshot paths, selected optimization target, comparison resultlogs/: raw command output for each test, bench, and summary phasesnapshots/baseline/: first benchmark summary, perf scorecard, and copied benchmark artifactssnapshots/verification/: second benchmark summary, perf scorecard, and copied benchmark artifacts after optimizationcomparison.json: before/after improvement summary once verification is complete
The runner records an optimization checkpoint after the first test and benchmark pass. It selects one candidate deterministically using:
- config/perf_targets.json as the source of truth
- target-bucket order:
engine_core, thenservice_budget/direct_api, thenservice_budget/transport, thenservice_budget/contention, theninternal_explainer - percent over the
operational_targetinside each bucket - percent over the
stretch_targetas the next tie-breaker inside the bucket - higher current
mean_usas the final tie-breaker inside the bucket
The runner does not mutate source code during optimization. It records the target, then expects the engineer to make the code change before running the resume step.