From 926ca3901ccff3824cbf19176a3b7fe1b530f3c2 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Mon, 6 Jul 2026 22:57:22 -0500 Subject: [PATCH] fix(bench): reuse hello median for secure-cost parity row (consistent numbers) Signed-off-by: Diego Resendez --- bench/run.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bench/run.ts b/bench/run.ts index 4d328ee..431269d 100644 --- a/bench/run.ts +++ b/bench/run.ts @@ -120,10 +120,12 @@ async function main(): Promise { const runs = await measure(port, sr.path, 'GET'); stepScaling.push({ path: sr.path, steps: sr.steps, reqSec: aggregate(runs.map((r) => r.reqSec)).median }); } - secureCost.push({ - label: 'security:false (parity)', - reqSec: aggregate((await measure(port, '/hello', 'GET')).map((r) => r.reqSec)).median, - }); + // Reuse the hello scenario's already-computed median so the parity row exactly matches + // the green-tea hello-table number (rather than re-measuring the same server/config). + const helloMedian = scenarioBlocks + .find((b) => b.name === 'hello')! + .rows.find((r) => r.framework === 'green-tea')!.reqSec.median; + secureCost.push({ label: 'security:false (parity)', reqSec: helloMedian }); } } finally { await kill();