perf: add browser paint phase measurements#43
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enhances the pnpm perf:ui benchmark to emit additional, renderer-clock-based phase timings (navigation → connection → transcript visible → real list visible → stable paint) alongside the existing end-to-end Playwright test duration, and documents how to interpret the new measurements.
Changes:
- Extend the UI perf runner to collect per-phase samples from the browser benchmark and include them as separate metrics in the perf report.
- Instrument the
@soak10k-history mount test to record phase timestamps (including a “two RAFs after tail visible” paint-stability sample) and optionally write them to a file. - Update performance documentation to explain the new UI phase breakdown and the measurement boundary.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| scripts/perf/ui.mjs | Collects phase JSON output per repetition, validates samples, and emits additional per-phase metrics in the UI perf report. |
| e2e/remote-app.spec.ts | Records renderer-clock timestamps for navigation/connection/mount/paint milestones and writes phase metrics when requested by the perf runner. |
| docs/PERFORMANCE.md | Documents the new UI phase timings and clarifies interpretation (renderer clock, not physical display latency). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 91fc85dbc3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
TestInfotiming trapVPS sample
Five corrected runs on the same private Linux VPS produced medians of 520 ms from session click to transcript shell, 812 ms to the real list, and 840 ms to the stable painted tail. The original mount-assertion boundary was 2.95 s; the full instrumented scenario was 3.14 s.
Verification
pnpm checknode --test scripts/perf/perf.test.mjsscripts/perf/ui.mjsrun under Node 24