profiler_top_markers
Identifies high-cost main-thread markers in a Unity Profiler capture, exporting first if needed; sort by spikeAvg to reveal what grows in the top 5% of frame times.
Instructions
Most expensive main-thread markers of one capture (exports first if needed). sortBy spikeAvg shows what grows in the slowest 5% of frames.
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": {
"capture": "<capture>"
},
"name": "profiler_top_markers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| folder | No | Capture folder. Default: UNITY_PROFILER_CAPTURES or <project>/ProfilerCaptures from the open editor. | |
| sortBy | No | ||
| capture | Yes | Capture file name (with or without .data) inside the capture folder, or an absolute path. | |
| contains | No | Case-insensitive substring filter on the marker path. | |
| maxDepth | No | Only markers at or above this hierarchy depth (0 = PlayerLoop level). |