profiler-load
Restore a saved profiling session from disk to memory. List available sessions, then load React or native profiler data for query tools to analyze.
Instructions
Fetch and restore a previously captured profiling session from disk into memory so query tools can operate on it. This is the disk-restore counterpart to react-profiler-stop/native-profiler-stop, which write data, and to the query tools (profiler-cpu-query, profiler-commit-query, profiler-stack-query), which read it. Use when you need to revisit past session data without capturing a new recording. Modes:
list: Show all available profiling sessions in the project's debug directory.
load_react: Load a React profiler session (CPU profile + commit tree) into memory. Requires session_id.
load_native: Re-parse native profiler XML files into memory. Requires session_id and device_id. For Android .pftrace restores, pass app_process for older sessions that do not have a metadata sidecar. Returns a summary of the loaded session or a session list for the list mode. Fails if the session_id is not found or required XML files are missing from disk.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | list: show available sessions on disk. load_react: load a React profiler session into memory for query tools. load_native: re-parse native profiler XML files (xctrace on iOS) into memory for query tools. | |
| port | No | Metro port — the loaded React data is cached under this port for query tools (default 8081) | |
| device_id | Yes | Target device id from `list-devices`. Used to cache the loaded React session under the correct port+device key, and required to resolve the native profiler session for load_native. | |
| session_id | No | Timestamp-based session identifier (e.g. '20250313-143022') from the list output. Required for load_react and load_native modes. | |
| app_process | No | Android package name to use when restoring older load_native .pftrace sessions that do not have a metadata sidecar. |