mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
Adds an `idle-cost` scenario for the symptom Brooklyn reported: with a thread spinning, resizing the sidebar feels slow. It holds N tiles busy, pushes NO tokens, and measures the renderer's self-inflicted commit rate plus fps while dragging the splitter and while typing. It reproduces immediately. Five busy tiles, nothing streaming: idle commits 17.7/sec (should be 0 — nothing is happening) drag 1.4 fps p95 812ms, worst frame 1.9s typing 61 fps (fine — this is specific to resize) Attributing the drag window showed 105,385 TooltipProvider renders and ~15s of component time across a 60-frame gesture. Cause: `Tip` mounts a full Radix provider + Tooltip per call site, and there are ~107 of them. Radix's Tooltip holds real state and Popper subscribes to layout, so an unrelated interaction re-rendered all of them. Mounts the machinery lazily instead, on first hover/focus. Tooltip churn drops ~4x (105k -> 26k) and drag doubles to 3fps. Note `defaultOpen` on the armed Tooltip is load-bearing: the pointerenter that armed it has already fired, so Radix never sees it and the tip mounts silently closed. A test caught exactly that, and now guards it. 3fps is still bad — the remaining cost is the whole transcript re-rendering per resize frame (MessagePrimitive.Parts 12,600 renders / 10.5s, Block/Ct 24,300 each, all 100% wasted). Separate fix.
35 lines
1.2 KiB
JavaScript
35 lines
1.2 KiB
JavaScript
// Scenario registry. Add a scenario module here and it's automatically
|
|
// available to the runner, the default suite (tier 'ci'), and the baseline gate.
|
|
|
|
import coldStart from './cold-start.mjs'
|
|
import firstToken from './first-token.mjs'
|
|
import idleCost from './idle-cost.mjs'
|
|
import keystroke from './keystroke.mjs'
|
|
import multitab from './multitab.mjs'
|
|
import profileSwitch from './profile-switch.mjs'
|
|
import renderChurn from './render-churn.mjs'
|
|
import sessionSwitch from './session-switch.mjs'
|
|
import stream from './stream.mjs'
|
|
import streamHistory from './stream-history.mjs'
|
|
import submit from './submit.mjs'
|
|
import transcript from './transcript.mjs'
|
|
|
|
export const SCENARIOS = {
|
|
[stream.name]: stream,
|
|
[streamHistory.name]: streamHistory,
|
|
[keystroke.name]: keystroke,
|
|
[transcript.name]: transcript,
|
|
[multitab.name]: multitab,
|
|
[renderChurn.name]: renderChurn,
|
|
[idleCost.name]: idleCost,
|
|
[coldStart.name]: coldStart,
|
|
[firstToken.name]: firstToken,
|
|
[submit.name]: submit,
|
|
[sessionSwitch.name]: sessionSwitch,
|
|
[profileSwitch.name]: profileSwitch
|
|
}
|
|
|
|
/** Scenarios safe to run with no LLM credits / no live backend — the default suite. */
|
|
export const CI_SCENARIOS = Object.values(SCENARIOS)
|
|
.filter(s => s.tier === 'ci')
|
|
.map(s => s.name)
|