Skip to content

Commit 76bab6c

Browse files
committed
site: collapse sub-noise-floor added-latency band (|v|<15us) to ~0
1 parent ff78510 commit 76bab6c

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

‎site/app.js‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,14 @@ const CMP_COLORS = ["#4cc38a", "#6cb6ff", "#e5a54b"];
2121

2222
const fmtInt = (v) => Math.round(v).toLocaleString("en-US");
2323
// Added-latency metrics are a difference of two independently measured percentiles
24-
// (through-gateway minus direct-to-mock). When the true overhead is below the timer
25-
// noise floor that difference can come out slightly negative; render it as "~0"
26-
// rather than implying the gateway makes requests faster.
27-
const fmtAdded = (v) => (v < 0 ? "~0" : fmtInt(v));
24+
// (through-gateway minus direct-to-mock). Subtracting two noisy p99s has a jitter of
25+
// roughly +/-15 us, so any result inside that band - negative OR a tiny positive - is
26+
// statistically zero, not real overhead. Collapse the whole sub-noise band to "~0" so
27+
// a genuine tie does not read as a win or loss on the sign alone. On the 20ms-paced
28+
// stream suite the per-frame CPU cost is smaller than this floor by construction; the
29+
// CPU-bound stream bench is what would resolve it.
30+
const ADDED_NOISE_FLOOR_US = 15;
31+
const fmtAdded = (v) => (Math.abs(v) < ADDED_NOISE_FLOOR_US ? "~0" : fmtInt(v));
2832
const fmt1 = (v) => v.toLocaleString("en-US", { minimumFractionDigits: 1, maximumFractionDigits: 1 });
2933
const fmtPct = (v) => `${v > 0 ? "+" : ""}${v.toFixed(1)}%`;
3034

0 commit comments

Comments
 (0)