perf(tooling): add automated streaming profiler
Adds `bun run profile:session`: creates a session, opens it in a real browser, dispatches a prompt through the supported `openchamber session` CLI, and records until the session reports itself idle. No input is synthesised, so everything captured is the app reacting to its own event stream. Streaming is judged by responsiveness rather than totals, so the report leads with the long-task distribution, style recalculation and layout rates, frame production, and the application's own stream counters. Two failure modes are detected rather than reported as clean results. A session belonging to a directory the browser is not viewing renders nothing and produces a perfectly quiet profile, so the run verifies both new message elements in the DOM and message-list render counters. And `RunTask` is only emitted under the disabled-by-default timeline category, so a capture without it reports zero long tasks; the missing-task case is now called out instead of being shown as zero. Metric helpers are shared with the idle profiler.
This commit is contained in:
+2
-1
@@ -82,7 +82,8 @@
|
||||
"release:test": "./scripts/test-release-build.sh",
|
||||
"release:test:intel": "./scripts/test-release-build.sh x86_64",
|
||||
"release:test:arm": "./scripts/test-release-build.sh aarch64",
|
||||
"profile:idle": "node scripts/profile-idle.mjs"
|
||||
"profile:idle": "node scripts/profile-idle.mjs",
|
||||
"profile:session": "node scripts/profile-session.mjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"@base-ui/react": "^1.4.0",
|
||||
|
||||
Reference in New Issue
Block a user