Measure `]` per-press latency plus memory ceilings on a fresh renderer.
()
| 25 | |
| 26 | /** Measure `]` per-press latency plus memory ceilings on a fresh renderer. */ |
| 27 | async function measureNavigation() { |
| 28 | const setup = await testRender( |
| 29 | React.createElement(AppHost, { bootstrap: createLargeSplitStreamBootstrap() }), |
| 30 | INTERACTION_VIEWPORT, |
| 31 | ); |
| 32 | |
| 33 | try { |
| 34 | const firstFrameStart = performance.now(); |
| 35 | await renderPass(setup); |
| 36 | console.log(`METRIC first_frame_ms=${(performance.now() - firstFrameStart).toFixed(2)}`); |
| 37 | printMemoryMetrics("after_first_frame"); |
| 38 | |
| 39 | // Settle initial async work (selection reveal, highlight kick-off) so the |
| 40 | // press latencies measure navigation, not startup spillover. |
| 41 | await renderPass(setup, 2); |
| 42 | |
| 43 | const pressLatencies = await measureKeyPressLatencies(setup, "]", NAVIGATION_PRESSES); |
| 44 | printLatencyMetrics("hunk_nav_press", pressLatencies); |
| 45 | printMemoryMetrics("after_navigation"); |
| 46 | } finally { |
| 47 | await destroyRenderer(setup); |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | /** Measure per-scroll-tick latency on a fresh renderer (no navigation state). */ |
| 52 | async function measureScrolling() { |
no test coverage detected