#!/usr/bin/env node /** * qa-weather-perf — matched-route throughput and idle-work measurement for the * Weather layers (Wind, Rain radar, Satellite clouds, Lightning density). * * This is a measurement harness, not a pass/fail gate. It reproduces one fixed * camera route per weather state so two builds (or two basemaps) can be * compared on the same numbers: * * park 10 km over Austin → 3 s flight to 1.2 km (heading 20°, pitch −45°) * → 6 s close idle → 8 s orbit at 1.8 km range → 3 s flight back to the * 17,368 km globe view → 6 s globe idle. * * Route windows hold render demand constant (`scene.requestRender()` on every * animation frame) so the idle-render governor cannot masquerade as low FPS. * FPS counts `scene.postRender` fires, and every window asserts the canvas * size did not change, because a stopped renderer with a free-running rAF * reads as a clean 60 fps otherwise. * * The separate idle test restores the normal governor, parks the camera at * the 1.2 km pose with Wind off, and counts scene redraws, DOM mutations * inside `.weather-summary`, and `.weather-summary` height changes over * 8-second windows for: weather off, history paused, history playing. * * Usage: * node scripts/qa-weather-perf.mjs [--url http://localhost:4173] * [--label google-baseline] [--states off,wind,...] [--repeat 1] * [--headless] [--no-route] [--no-idle] [--out qa-shots/weather-perf] * * States: off · history-paused · history-playing · wind · wind+history-paused * · wind+history-playing. "history" is radar + regional clouds + lightning * together; "wind" is animated GFS wind with the Speed field selected. * Requires a running dev server. Screenshots and results.json land in * /