Chat perf: path-free running border, keystroke- and delta-quiet composer, spinners that do not relayout their list
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,7 +30,7 @@ const { values: opts } = parseArgs({
|
||||
options: {
|
||||
build: { type: 'string' }, out: { type: 'string' }, repeat: { type: 'string', default: '3' },
|
||||
gpu: { type: 'boolean' }, size: { type: 'string', default: '3840x2160' }, dpr: { type: 'string', default: '1' },
|
||||
only: { type: 'string' }, live: { type: 'string', default: '200' },
|
||||
only: { type: 'string' }, live: { type: 'string', default: '200' }, data: { type: 'string' }, frames: { type: 'boolean' },
|
||||
},
|
||||
});
|
||||
if (!opts.build || !opts.out) throw new Error('usage: --build <dir> --out <dir> [--gpu]');
|
||||
@@ -39,6 +39,8 @@ const DPR = Number(opts.dpr);
|
||||
const DATA = {
|
||||
chats: '12', msgs: '150', rich: '1', links: '1', turnactivity: '1',
|
||||
timestamps: '1', shown: '1', turndiffs: '1', theme: 'light',
|
||||
// --data 'chats=20&msgs=200,60&bgwork=1' adds or overrides fixture options.
|
||||
...Object.fromEntries(new URLSearchParams(opts.data ?? '')),
|
||||
};
|
||||
|
||||
const r1 = (x) => Math.round(x * 10) / 10;
|
||||
@@ -179,6 +181,8 @@ async function measure(name, extra, drive) {
|
||||
};
|
||||
}
|
||||
if (errors.length) result.errors = [...new Set(errors)].slice(0, 3);
|
||||
// --frames keeps every measured frame's build/raster ms in the JSON.
|
||||
if (opts.frames) result.frameMs = frames.map((f) => `${r1(f[0] / 1000)}/${r1(f[1] / 1000)}`).join(' ');
|
||||
runs.push(result);
|
||||
} finally {
|
||||
await browser.close().catch(() => {});
|
||||
@@ -216,6 +220,20 @@ const SCENARIOS = {
|
||||
}
|
||||
},
|
||||
},
|
||||
ctrltab: {
|
||||
extra: {},
|
||||
drive: async (io) => {
|
||||
await io.tap(points.composer);
|
||||
await delay(300);
|
||||
for (let i = 0; i < 6; i++) {
|
||||
await io.send('Input.dispatchKeyEvent', { type: 'rawKeyDown', key: 'Control', code: 'ControlLeft', modifiers: 2, windowsVirtualKeyCode: 17 });
|
||||
await io.send('Input.dispatchKeyEvent', { type: 'rawKeyDown', key: 'Tab', code: 'Tab', modifiers: 2, windowsVirtualKeyCode: 9 });
|
||||
await io.send('Input.dispatchKeyEvent', { type: 'keyUp', key: 'Tab', code: 'Tab', modifiers: 2, windowsVirtualKeyCode: 9 });
|
||||
await io.send('Input.dispatchKeyEvent', { type: 'keyUp', key: 'Control', code: 'ControlLeft', modifiers: 0, windowsVirtualKeyCode: 17 });
|
||||
await delay(900);
|
||||
}
|
||||
},
|
||||
},
|
||||
type: {
|
||||
extra: {},
|
||||
drive: async (io) => {
|
||||
|
||||
Reference in New Issue
Block a user