From 91685c94d9b29aa7be88e5a2d100b296259e6245 Mon Sep 17 00:00:00 2001 From: German Khokhlov Date: Wed, 4 Nov 2026 00:58:28 +0400 Subject: [PATCH] Assert the soak's heap slope from switch 20 again Measured over the second half the heap still grew about 20 KiB per switch in the acceptance run (117.8 to 123.8 MiB from switch 250 to 500), so the narrower window did not separate warm-up from growth; the original check stays. --- scripts/qa-strict-soak.mjs | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/scripts/qa-strict-soak.mjs b/scripts/qa-strict-soak.mjs index 1373a85be..d5d3ffbd9 100644 --- a/scripts/qa-strict-soak.mjs +++ b/scripts/qa-strict-soak.mjs @@ -17,11 +17,7 @@ // With --assert (the long run), after the warm-up (switch 20): live WebGL // objects per engine context grow by at most 0.1 per switch (least-squares // slope over the checkpoints) and by at most 64 overall; no new WebGL -// context; JS heap slope at most 10 KiB per switch over the second half of -// the run (the first half is reported too: V8's compiled code and the -// layers' caches grow for about 250 switches under this workload, then the -// heap is flat, while a retained object per switch keeps growing); no new -// document; the +// context; JS heap slope at most 10 KiB per switch; no new document; the // webglcontextlost/restored listener counts on both engine canvases stay as // they were (each canvas keeps its webglcontextlost listener). // @@ -349,17 +345,12 @@ if (strictMode) { pass: last.webgl.length === first.webgl.length, }); const heap = late.map((c) => [c.swap, c.heapMiB * 1024]); - const steady = heap.filter(([swap]) => swap >= swaps / 2); - assert.ok(steady.length >= 2, 'enough checkpoints in the second half'); checks.push({ - check: 'JS heap KiB per switch, second half', - slopePerSwap: Math.round(slope(steady) * 100) / 100, - fromSwitch: steady[0][0], - fromMiB: Math.round((steady[0][1] / 1024) * 100) / 100, + check: 'JS heap KiB per switch', + slopePerSwap: Math.round(slope(heap) * 100) / 100, + fromMiB: first.heapMiB, toMiB: last.heapMiB, - warmUpSlopePerSwap: Math.round(slope(heap) * 100) / 100, - warmUpFromMiB: first.heapMiB, - pass: slope(steady) <= 10, + pass: slope(heap) <= 10, }); checks.push({ check: 'documents',