sootsim cpu-profile
capture a JS CPU profile of the sim workers over the Chrome DevTools Protocol
sootsim cpu-profile
Captures a sampled .cpuprofile of each sim worker via the Chrome DevTools Protocol — the page-target Target.setAutoAttach discovers the tenant + shell worker sessions, and Profiler.* is routed to each over its sessionId (flatten mode). The sim must expose a CDP port: the easiest way is sootsim open <port> --new --driver playwright --cdp-port <n>, which stays driveable over the bridge so you can scroll/navigate while profiling (a standalone CDP Chrome also works but can’t be driven). The busiest worker is saved to --output; the others get a .workerN suffix. Load the result in Chrome DevTools → Performance, or speedscope. (Previously unsupported — the in-worker JS Self-Profiler can’t run in a dedicated worker; the CDP path replaced it, F28.)
terminal
Options
| flag | description |
|---|---|
--cdp-port <port> | Chrome DevTools port to attach to (default: $SOOTSIM_CDP_PORT or 9222) |
--duration <seconds> | recording duration (default: 5) |
--match <substring> | pick the page target whose URL contains this when several share the browser (default: /rn/) |
--output <path> | -o; output .cpuprofile for the busiest worker; other workers get a .workerN suffix (default: /tmp/sootsim.cpuprofile) |
--sample-interval <ms> | requested sampling interval (default: 0.1) |
Examples
terminal