hermes-agent/apps/desktop/scripts/perf/scenarios
Brooklyn Nicholson f7aee9dc8c fix(desktop): make render-churn measure streaming, not boot churn
Two problems, both found by distrusting the harness's own numbers.

1. The scenario slept a fixed 1s after mounting tabs, then recorded. Boot
   and session hydration are not reliably done by then, so a variable
   amount of unrelated work landed inside the measurement window. Three
   back-to-back runs on identical code spread 2.2x on total_renders and
   3.8x on wasted_renders — wide enough that a single-run before/after
   delta could be mostly noise. Replaced with a quiesce gate that waits
   for commits to hold still before recording, and reports 'quiet:N' or
   'timeout:...' so a contaminated run is visible instead of silent.

2. The counter attributed a context-driven re-render as 'wasted', which
   pointed at memo() as the fix when memo cannot block context at all.
   Adds contextChanged via the fiber's context dependency list, and
   excludes it from wasted.

The gate also turned up a finding worth more than the fix: with five busy
tiles and NO driver running, the renderer still commits ~18x/sec. The
report now names the cascade roots (own state changed, props did not)
rather than leaving them to be guessed at — Streamdown re-renders itself
105 times while idle, which is what drives Block/Ct.
2026-07-26 15:54:18 -05:00
..
cold-start.mjs bench(desktop): measure the full picture — prod build, cold-start, first-token (#67697) 2026-07-19 17:52:39 -05:00
first-token.mjs bench(desktop): measure the full picture — prod build, cold-start, first-token (#67697) 2026-07-19 17:52:39 -05:00
index.mjs feat(desktop): render-churn perf scenario 2026-07-26 06:11:00 -05:00
keystroke.mjs bench(desktop): systematized perf harness; sunset 12 one-off scripts (#67466) 2026-07-19 07:41:00 -04:00
multitab.mjs perf(desktop): add a multitab scenario to the perf harness 2026-07-26 00:34:00 -05:00
profile-switch.mjs bench(desktop): systematized perf harness; sunset 12 one-off scripts (#67466) 2026-07-19 07:41:00 -04:00
render-churn.mjs fix(desktop): make render-churn measure streaming, not boot churn 2026-07-26 15:54:18 -05:00
session-switch.mjs bench(desktop): systematized perf harness; sunset 12 one-off scripts (#67466) 2026-07-19 07:41:00 -04:00
stream-history.mjs perf(desktop): add a stream-history scenario to the perf harness 2026-07-26 03:15:48 -05:00
stream.mjs perf(desktop): add a stream-history scenario to the perf harness 2026-07-26 03:15:48 -05:00
submit.mjs bench(desktop): systematized perf harness; sunset 12 one-off scripts (#67466) 2026-07-19 07:41:00 -04:00
transcript.mjs bench(desktop): systematized perf harness; sunset 12 one-off scripts (#67466) 2026-07-19 07:41:00 -04:00