{"id":14961411,"url":"https://github.com/godotengine/godot-benchmarks","last_synced_at":"2025-04-04T16:11:57.945Z","repository":{"id":42011639,"uuid":"324001373","full_name":"godotengine/godot-benchmarks","owner":"godotengine","description":"Collection of benchmarks to test performance of different areas of Godot","archived":false,"fork":false,"pushed_at":"2025-02-06T14:20:14.000Z","size":73762,"stargazers_count":129,"open_issues_count":11,"forks_count":38,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-28T15:05:03.465Z","etag":null,"topics":["benchmarking","performance-testing"],"latest_commit_sha":null,"homepage":"https://benchmarks.godotengine.org","language":"GDScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/godotengine.png","metadata":{"funding":{"custom":"https://fund.godotengine.org/"},"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-23T21:04:50.000Z","updated_at":"2025-03-27T13:32:26.000Z","dependencies_parsed_at":"2024-11-30T19:31:44.402Z","dependency_job_id":null,"html_url":"https://github.com/godotengine/godot-benchmarks","commit_stats":{"total_commits":89,"total_committers":19,"mean_commits":4.684210526315789,"dds":0.7752808988764045,"last_synced_commit":"ead3265fb44c63a99b510e2ba3c7bfce31cb13f5"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godotengine%2Fgodot-benchmarks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godotengine%2Fgodot-benchmarks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godotengine%2Fgodot-benchmarks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godotengine%2Fgodot-benchmarks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/godotengine","download_url":"https://codeload.github.com/godotengine/godot-benchmarks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208142,"owners_count":20901570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmarking","performance-testing"],"created_at":"2024-09-24T13:25:03.400Z","updated_at":"2025-04-04T16:11:57.915Z","avatar_url":"https://github.com/godotengine.png","language":"GDScript","funding_links":["https://fund.godotengine.org/"],"categories":[],"sub_categories":[],"readme":"# godot-benchmarks\n\nThis is a Godot project that stores and runs a collection of benchmarks. It is\nused to test performance of different areas of [Godot](https://godotengine.org)\nsuch as rendering and scripting.\n\n**Interested in adding new benchmarks?** See [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Running benchmarks\n\n### Setup\n\nTo be able to run C# benchmarks, you need to use a .NET build of Godot. If not\nusing a .NET build, the project will still be able to run GDScript and C++\nbenchmarks (if compiled), but C# benchmarks won't run.\n\nTo be able to run C++ benchmarks, you need to compile the GDExtension for your\nplatform in the [`gdextension/`](gdextension/) folder. To do so, run the\nfollowing commands in that folder:\n\n```bash\ncd gdextension/\ngit submodule update --init --recursive\nscons\nscons target=template_release\n```\n\nRemember to recompile the extension after any changes to the C++ code have been\nmade, so that the changes are reflected when running benchmarks.\n\n### Using a graphical interface\n\nOpen the project in the editor, then run it from the editor or from an export\ntemplate binary. Select benchmarks you want to run, then click the **Run** button\nin the bottom-right corner.\n\nOnce benchmarks are run, you can copy the results JSON using the\n**Copy JSON to Clipboard** button at the bottom. The results JSON is also printed to\nstandard output, which you can see if you're running the project from a terminal.\nv\n### Using the command line\n\nAfter opening the project in the editor (required so that resources can be imported),\nyou can run benchmarks from an editor or export template binary. The project will\nautomatically quit after running benchmarks.\n\nThe results JSON is printed to standard output once all benchmarks are run.\nYou can save the results JSON to a file using `--save-json=\"path/to/file.json\"`\n(the target folder **must** exist).\n\n\u003e [!TIP]\n\u003e\n\u003e To import the project in the editor from the command line, use `godot --import`.\n\n\u003e [!NOTE]\n\u003e\n\u003e `godot` is assumed to be in your `PATH` environment variable here. If this is\n\u003e not the case, replace `godot` with the absolute path to your Godot editor or export template binary.\n\n#### Run all benchmarks\n\n```bash\n# The first `--` is important.\n# Otherwise, Godot won't pass the CLI arguments to the project.\ngodot -- --run-benchmarks\n```\n\n`--json-results-prefix=\u003cstring\u003e` can be used to nest individual results within a\ndictionary that has the name `\u003cstring\u003e`. This can be used for easier merging of\nseparate result runs with `jq`.\n\n#### Run a single benchmark\n\nThe `--include-benchmarks` CLI argument can be used to specify the name.\nThe project will print a message to acknowledge that your argument was taken\ninto account for filtering benchmarks.\n\nBenchmark names all follow `category/subcategory/some_name` naming, with\n`category/subcategory` being the name *all* path components (folders) and\n`some_name` being the name of the benchmark's scene file without the `.tscn` extension.\n\n```bash\ngodot -- --run-benchmarks --include-benchmarks=\"rendering/culling/basic_cull\"\n```\n\n#### Run a category of benchmarks\n\nUse glob syntax (with `*` acting as a wildcard) to run a category of benchmarks:\n\n```bash\n--include-benchmarks=\"rendering/culling/basic_cull\"\n```\n\nYou can exclude specific benchmarks using the `--exclude-benchmarks` command line argument.\nThis argument also supports globbing and can be used at the same time as `--include-benchmarks`.\n\n#### Results\n\nFor each benchmark, the project will track how long the main thread spent setting up the scene,\nthen run the scene for five seconds and log the average per-frame statistics.\n(All times given are in milliseconds. Lower values are better.)\n\n- **Render CPU:** Average CPU time spent rendering each frame (such as setting up draw calls).\n  This metric does *not* take process/physics process functions into account.\n- **Render GPU:** Average GPU time spent per frame.\n- **Idle:** Average CPU time spent in C++ and GDScript process functions per second.\n- **Physics:** Average CPU time spent in C++ and GDScript physics process functions per second.\n- **Main Thread Time:** Time spent setting up the scene on the main thread.\n  For rendering benchmarks, this acts as a loading time measurement.\n\nNote that not all benchmarks involve running a scene (for example, GDScript benchmarks).\nIn those cases, per-frame statistics will not be recorded,\nand **Main Thread Time** will reflect the runtime of the entire benchmark.\n\n## Tips and tricks\n\n### Comparing results between runs\n\n[`jq`](https://github.com/stedolan/jq) is a command line tool that greatly simplifies\nthe task of processing JSON files. You can use the following command as a starting point\nfor creating benchmark comparisons:\n\n```bash\njq -n --tab '\n\t[inputs.benchmarks] | transpose[] | select(all(.results != {})) |\n\t.[0].results = (\n\t\t[[.[].results | to_entries] | transpose[] | select(all(.value != 0)) |\n\t\t{key: .[0].key, value: {\n\t\t\ta: .[0].value,\n\t\t\tb: .[1].value,\n\t\t\ta_div_b: (.[0].value / .[1].value)\n\t\t}}] | from_entries\n\t) | .[0]\n' a.json b.json\n```\n\nSample output (truncated to a single benchmark for brevity):\n\n```json\n{\n\t\"category\": \"Rendering \u003e Lights And Meshes\",\n\t\"name\": \"Sphere 1000\",\n\t\"results\": {\n\t\t\"render_cpu\": {\n\t\t\t\"a\": 3.952,\n\t\t\t\"b\": 4.031,\n\t\t\t\"a_div_b\": 0.9804018853882412\n\t\t},\n\t\t\"render_gpu\": {\n\t\t\t\"a\": 45.36,\n\t\t\t\"b\": 45.44,\n\t\t\t\"a_div_b\": 0.9982394366197184\n\t\t},\n\t\t\"time\": {\n\t\t\t\"a\": 38.95,\n\t\t\t\"b\": 35.04,\n\t\t\t\"a_div_b\": 1.1115867579908676\n\t\t}\n\t}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgodotengine%2Fgodot-benchmarks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgodotengine%2Fgodot-benchmarks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgodotengine%2Fgodot-benchmarks/lists"}