Profile JS
profile_jsRecords a Hermes CPU profile for a set duration and reports JS thread busy/idle/GC time, top self and inclusive functions, saving the raw .cpuprofile for Chrome DevTools analysis.
Instructions
Record a Hermes CPU profile for duration_ms, then report where the JS thread spent its time: busy/idle/GC split, the functions with the most self time, and the ones with the most inclusive time (symbolicated through Metro when it can). The raw .cpuprofile is saved to disk and opens in Chrome DevTools → Performance → Load. Drive the app (or leave it alone) while this runs — the profile covers whatever happens during the window.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | Rows per table (default 20). | |
| save | No | Write the raw .cpuprofile to disk (default true). Set false to get the summary only. | |
| duration_ms | No | How long to sample for (default 5000, max 120000). | |
| sampling_interval_us | No | Sampling interval in microseconds. Hermes may ignore it and keep its own default. |