profiler-hotpath
Identify performance bottlenecks by returning the top N most expensive functions in a Unity profiler frame, sorted by self or total time. Skip the full hierarchy scan for quick analysis.
Instructions
Returns the top N most expensive functions in a profiler frame, sorted by self time or total time. Useful for quickly identifying performance bottlenecks without reading the full hierarchy.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "profiler-hotpath"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| frameIndex | No | Frame index to analyze. Use -1 for the latest available frame. Default: -1 | -1 |
| threadIndex | No | Thread index. 0 = Main Thread. Default: 0 | 0 |
| topN | No | Number of top entries to return. Default: 20 | 20 |
| sortBy | No | Sort by 'selfTime' or 'totalTime'. Default: selfTime Values: [TotalTime, SelfTime] | selfTime |
| maxDepth | No | Maximum tree depth to scan. Deeper = more complete but slower. Default: 15 | 15 |