Skip to content

Commit 4e12cab

Browse files
committed
chore(perf): adversarial-runner control cycle gets a warm-up before timing — honest budget measures the gate, not process cold-start [C20]
1 parent e32e324 commit 4e12cab

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎examples/delivery-fixture/adversarial-runner.mjs‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,14 @@ async function runGate(fixture, context = "gate cycle") {
365365

366366
const results = [];
367367

368+
// Warm-up, deliberately unmeasured: the control cycle is the FIRST gate call
369+
// in this process, so its timing is cold-start (JIT compile + module load +
370+
// page-in), not the gate's real cost — it flapped past the 250ms budget
371+
// (300–400ms cold vs 80–160ms warm) while every later cycle sat at a fraction
372+
// of it [C20]. Warming up before the measured control keeps the budget honest
373+
// about the gate, not about process birth.
374+
await verifyDeliveryFixture(honestFixture(), evm);
375+
368376
// Control: the honest fixture must stay clean — a runner whose baseline
369377
// already fails proves nothing.
370378
const control = await runGate(honestFixture(), "control (honest fixture)");

0 commit comments

Comments
 (0)