profiler-load
Load saved React or native profiling sessions from disk so query and analysis tools can inspect past recordings without capturing new data; use list mode to find available sessions.
Instructions
Fetch and restore a profiling session that react-profiler-stop or native-profiler-stop saved to disk, so the query tools (profiler-cpu-query, profiler-commit-query, profiler-stack-query) can 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: Restore native trace data (xctrace XML on iOS, .pftrace on Android). Requires session_id. Loading replaces the session in memory for this device_id (and Metro port, for React): the one the query tools and react-profiler-analyze read. The replaced session stays on disk; load it again by its session_id. Returns a summary of the loaded session or a session list for the list mode. Fails if the session_id is not found or the session's trace files are missing from disk.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"mode": "<mode>",
"device_id": "<device_id>"
},
"name": "profiler-load"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | What to do; see Modes in the tool description. | |
| port | No | Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. Range: 1 to 65535. | |
| 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. | |
| app_process | No | Android package name to pass when restoring an older load_native .pftrace session that has no metadata sidecar. |