react-profiler-analyze
Analyze stored React profiling data to generate a markdown performance report that identifies hot commits, render cascades, root causes, and top components for debugging slow renders.
Instructions
Analyze stored profiling data and return a markdown performance report. Returns { report, reportFile, hotCommitsTotal, hotCommitsShown, sessionFiles }. The report is structured around hot React commits (≥16ms absolute floor) with per-commit render cascades, root cause identification, and a top components table. Raw profiling data is saved to disk with a unique session timestamp for later reload via profiler-load. After presenting the report, ask the user whether to investigate further (drill-down with profiler-cpu-query / profiler-commit-query) or implement fixes and re-profile for comparison. Use when the profiling session is complete and you need to interpret the collected data. Fails if react-profiler-stop has not been called or no profiling data is stored.
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": {
"device_id": "<device_id>",
"project_root": "<project_root>"
},
"name": "react-profiler-analyze"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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. | |
| platform | No | Platform for source lookup when the recording does not identify one. | |
| device_id | Yes | Device ID used to record or load the React profile. | |
| rn_version | No | React Native version (e.g. "0.73.4"). Default: "unknown". | unknown |
| annotations | No | User actions to annotate the report's commits with: each commit shows the action that preceded it. | |
| project_root | Yes | Absolute path to the RN project root for session context detection |