profiler-commit-query
Query React commit data to investigate render performance by component, time range, commit index, cascade tree, or re-render counts.
Instructions
Query React commit data for iterative investigation of render performance. Modes:
by_component: All commits where component_name rendered, with causes and durations.
by_time_range: What happened in time_range_ms.
by_index: Full detail dump of the commit at commit_index (all components, props changed, parent cascade).
cascade_tree: Parent-child cascade tree for the commit at commit_index, showing who triggered whom.
render_counts: Re-render count, rate and self time per component over ALL commits, including those under 16ms that the other modes cannot see. Library components included. Use when drilling into specific components or time windows after react-profiler-analyze. Returns a markdown table or tree of commit data matching the requested mode. Fails if react-profiler-stop has not been called.
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>",
"mode": "<mode>"
},
"name": "profiler-commit-query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Query mode; 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. | |
| top_n | No | Max results to return. Defaults to 20 for by_component / by_time_range, which count commits, and render_counts, which counts components. by_index counts individual fibers and returns all of them unless this is set; a small cap there can show less than the analyze report it is meant to expand on. Must be greater than 0. | |
| device_id | Yes | Device ID used to record or load the React profile. | |
| commit_index | No | Commit index | |
| time_range_ms | No | Time range in ms since profiling started, the clock this tool prints | |
| component_name | No | Component name; optional for render_counts, which it narrows to one component |