Skip to content

Commit f44d5b4

Browse files
committed
test(signals): widen the attribution self-time gap to 40 ms
"measures self-time and aggregates costs by scope and root write" ranks a 10 ms memo above a cheap effect by wall-clock self-time. On this PR's CI run a scheduling pause inside the effect measured 17.9 ms against the memo's 10.1 ms. A 40 ms spin keeps the ranking meaningful under load. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
1 parent 6fb919e commit f44d5b4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎packages/signals/tests/attribution.test.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,9 +503,12 @@ describe("why-did-this-run attribution", () => {
503503
while (performance.now() < end);
504504
};
505505
const [n, setN] = createSignal(0, { name: "n" });
506+
// 40 ms, not 10: self-times are wall-clock, and on a loaded CI runner a
507+
// scheduling pause inside the cheap effect measured 17.9 ms against the
508+
// memo's 10.1 ms. The ranking asserted below needs the gap to be wide.
506509
const slow = createMemo(
507510
() => {
508-
spin(10);
511+
spin(40);
509512
return n();
510513
},
511514
{ name: "slow-memo" }

0 commit comments

Comments
 (0)