sootsim profile

Record a sampled CPU profile of the running sootsim tenant worker (where the guest app’s JS executes) via the W3C JS Self-Profiler API, and write a standard .cpuprofile that loads directly in Chrome DevTools (Performance panel → Load profile). No CDP, no env flag — sootsim already serves Document-Policy: js-profiling in vite dev and in the electron companion. Ideal for A/B comparisons across commits: profile before, make a change, profile after, then diff in DevTools.

terminal

sootsim profile [options]

Options

flagdescription
--duration <seconds>recording duration (default: 5)
--output <path>output file (default: /tmp/sootsim.cpuprofile). if the path ends in .gz, the file is gzipped
--sample-interval <ms>requested sample interval in ms (default: 10 — chrome may clamp upward)
--max-buffer <n>max samples buffered (default: 100000)
--session <tab-id>target a specific bridge tab

Examples

terminal

sootsim profile --duration 3
sootsim profile --duration 10 --output /tmp/after.cpuprofile.gz
sootsim profile --duration 3 -o /tmp/before.cpuprofile