Merge branch 'worktree-agent-a1b6c249e2bec6658'
This commit is contained in:
@@ -29,7 +29,7 @@ Per design it checks and prints (`BENCH <design> {...}` in the log):
|
||||
animation (one frame each).
|
||||
- `switchFramesPerSwitch`: frames to settle a live design switch; after the
|
||||
switches, no listener is left on the design controller.
|
||||
- Scrolling a 120-row CLI transcript: `scrollRebuildsPerFrame`,
|
||||
- Scrolling a 120-row CLI transcript: `scrollRebuildsPerRow`,
|
||||
`scrollLayersPerFrame` and `scrollSaveLayersPerFrame` (opacity, backdrop,
|
||||
image/colour filter and shader-mask layers), plus the layer kinds.
|
||||
- `themeBuildUs` (one uncached build) and `scrollFrameUs` are informational
|
||||
@@ -70,7 +70,13 @@ designs with each other, not with a device.
|
||||
|
||||
Click points assume the chat list's row positions at 1280x800 (chats at
|
||||
y=170/260/335); a design that changes list density a lot should check
|
||||
with `tool/capture` that those points still open the chats.
|
||||
with `tool/capture` that those points still open the chats, and give the
|
||||
step its own point keyed by design id (Compact: y=150/210/266).
|
||||
|
||||
The widget test budgets transcript rebuilds per row scrolled past
|
||||
(`scrollRebuildsPerRow`), not per frame: a denser design shows more rows in
|
||||
each 120px step for the same per-row cost. `scrollRebuildsPerFrame` stays
|
||||
informational.
|
||||
|
||||
## Rules the budget enforces
|
||||
|
||||
|
||||
@@ -43,7 +43,13 @@ const SCENARIOS = [
|
||||
{ name: 'scroll', label: 'scroll a 200-message transcript', ...CHAT,
|
||||
act: [{ wheel: [860, 400, -240, 40] }, { wheel: [860, 400, 240, 20] }] },
|
||||
{ name: 'switch', label: 'switch chats', ...CHAT,
|
||||
act: [{ click: [300, 260] }, { click: [300, 335] }, { click: [300, 170] }] },
|
||||
// Chat 2, chat 3, chat 1. Compact's thinner rows sit higher (verified
|
||||
// with tool/capture at 1280x800), so it names its own points.
|
||||
act: [
|
||||
{ click: [300, 260], compact: [300, 210] },
|
||||
{ click: [300, 335], compact: [300, 266] },
|
||||
{ click: [300, 170], compact: [300, 150] },
|
||||
] },
|
||||
{ name: 'runs', label: 'scroll 400 runs', size: '560x900', route: '/runs', q: { runs: '400' },
|
||||
act: [{ wheel: [280, 450, 240, 40] }] },
|
||||
{ name: 'graph', label: 'open and pan the run graph', size: '560x900', route: '/runs/7', q: { graph: '1' },
|
||||
@@ -88,9 +94,11 @@ async function drag([x, y, dx, dy]) {
|
||||
}
|
||||
await send('Input.dispatchMouseEvent', { type: 'mouseReleased', x: x + dx, y: y + dy, button: 'left', clickCount: 1 });
|
||||
}
|
||||
async function run(steps) {
|
||||
// A step's point under [design]: its own (`step[design]`) when the design
|
||||
// moves the target, else the shared one.
|
||||
async function run(steps, design) {
|
||||
for (const step of steps ?? []) {
|
||||
if (step.click) { await tap(step.click); await delay(1000); }
|
||||
if (step.click) { await tap(step[design] ?? step.click); await delay(1000); }
|
||||
if (step.drag) { await drag(step.drag); await delay(400); }
|
||||
if (step.wheel) {
|
||||
const [x, y, deltaY, count] = step.wheel;
|
||||
@@ -146,7 +154,7 @@ async function measure(s, design, others) {
|
||||
out.switches = Number(opts.switches) * others.length * 2;
|
||||
out.heapGrowthMB = (await heapMB()) - before;
|
||||
} else {
|
||||
await run(s.act);
|
||||
await run(s.act, design);
|
||||
await settle();
|
||||
}
|
||||
fetchesBy[design] ??= new Set();
|
||||
|
||||
Reference in New Issue
Block a user