web: bench fixes (done flag, readback sync), runner kills browser on failure, BENCH.md
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
6bd6020571
commit
8170f71e42
4 changed files with 19 additions and 3 deletions
|
|
@ -14,6 +14,8 @@ const proc = spawn(chrome, [`--remote-debugging-port=${port}`, `--user-data-dir=
|
|||
'--autoplay-policy=no-user-gesture-required', '--enable-unsafe-swiftshader', '--ignore-gpu-blocklist', '--window-size=1280,720',
|
||||
...(process.env.CHROME_FLAGS ? process.env.CHROME_FLAGS.split(' ') : []), 'about:blank'], { stdio: 'ignore' });
|
||||
const stop = code => { try { proc.kill(); } catch {} process.exit(code); };
|
||||
process.on('uncaughtException', e => { console.error(e); stop(1); }); // never leave the browser running if we die first
|
||||
process.on('exit', () => { try { proc.kill(); } catch {} });
|
||||
const sleep = ms => new Promise(r => setTimeout(r, ms));
|
||||
|
||||
let targets;
|
||||
|
|
|
|||
Loading…
Reference in a new issue