This is a Godot project that stores and runs a collection of benchmarks. It is used to test performance of different areas of Godot such as rendering and scripting.
Interested in adding new benchmarks? See CONTRIBUTING.md.
Open the project in the editor, then run it from the editor or from an export template binary. Select benchmarks you want to run, then click the Run button in the bottom-right corner.
Once benchmarks are run, you can copy the results JSON using the Copy JSON to Clipboard button at the bottom. The results JSON is also printed to standard output, which you can see if you're running the project from a terminal.
After opening the project in the editor (required so that resources can be imported), you can run benchmarks from an editor or export template binary. The project will automatically quit after running benchmarks.
The results JSON is printed to standard output once all benchmarks are run.
You can save the results JSON to a file using --save-json="path/to/file.json"
(the target folder must exist).
Note
To import the project in the editor from the command line, use
godot --editor --quit
. If this doesn't work, usetimeout 30 godot --editor
.
Note
godot
is assumed to be in yourPATH
environment variable here. If this is not the case, replacegodot
with the absolute path to your Godot editor or export template binary.
# The first `--` is important.
# Otherwise, Godot won't pass the CLI arguments to the project.
godot -- --run-benchmarks
The --include-benchmarks
CLI argument can be used to specify the name.
The project will print a message to acknowledge that your argument was taken
into account for filtering benchmarks.
Benchmark names all follow category/subcategory/some_name
naming, with
category/subcategory
being the name all path components (folders) and
some_name
being the name of the benchmark's scene file without the .tscn
extension.
godot -- --run-benchmarks --include-benchmarks="rendering/culling/basic_cull"
Use glob syntax (with *
acting as a wildcard) to run a category of benchmarks:
--include-benchmarks="rendering/culling/basic_cull"
You can exclude specific benchmarks using the --exclude-benchmarks
command line argument.
This argument also supports globbing and can be used at the same time as --include-benchmarks
.