Measure a scene's frame times
godot_perfRuns a Godot scene headless and reports frame-time percentiles, physics step cost, and slow-frame causes against a budget, comparing each run to its prior baseline.
Instructions
Run a scene in Godot 4.7 headless and measure it the way a player feels it: frame-time p50, p95, p99 and max against a budget (default 16.6 ms), the physics step apart from the rest of the frame, the slowest frames with what changed on them (nodes made or freed in one frame, a heavy physics step, script work), node and orphan counts, and the change since the last run of the same scene (kept in .godot/godotwright/perf/). Headless measures the CPU side (scripts, physics, scene work), not the GPU. input plays a timeline as godot_play does, to measure while something happens. An error result when p95 is over budget or more than 10% worse than last time. Lessons that fit the numbers are named. Measure before and after every performance change.
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": "godot_perf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | project folder, or a file or folder inside it (relative to the server's folder; default: the current project) | |
| input | No | input while measuring: "10 hold right 300" | |
| scene | No | the res:// scene to measure (default: the main scene) | |
| frames | No | frames to measure (default 600) | |
| warmup | No | frames to run first without measuring (default 60) | |
| baseline | No | compare with and save the last run of this scene (default true) | |
| budget_ms | No | frame budget in ms (default 16.6) | |
| timeout_seconds | No | timeout of the run (default 300) |