Skip to content

Add startup benchmarking support#64610

Merged
akien-mga merged 1 commit intogodotengine:masterfrom
reduz:startup-benchmark-support
Aug 22, 2022
Merged

Add startup benchmarking support#64610
akien-mga merged 1 commit intogodotengine:masterfrom
reduz:startup-benchmark-support

Conversation

@reduz
Copy link
Copy Markdown
Member

@reduz reduz commented Aug 19, 2022

This adds support for benchmarking engine startup (and editor startup if used).
The goal is to use this in the benchmarking server to track improvements and changes to engine, editor, importer and scene loading startup times.

Example of how it looks:

$ godot -e --startup-benchmark myscene.tscn
STARTUP BENCHMARK:
	- core :  0.027352  sec.
	- servers :  0.649285  sec.
	- scene :  0.304407  sec.
	- editor :  6.370338  sec.
	- editor_scan_and_import :  1.884974  sec.
	- editor_load_scene :  2.611782  sec.
	- total_time :  15.153595  sec.
$ godot -e --startup-benchmark-file benchmark.json  myscene.tscn
$ cat benchmark.json
{
	"core": 0.042078,
	"servers": 0.622677,
	"scene": 0.299243,
	"editor": 6.58016,
	"editor_scan_and_import": 1.838239,
	"editor_load_scene": 0.194263,
	"total_time": 12.845866
}

This adds support for benchmarking engine startup (and editor startup if used).
The goal is to use this in the benchmarking server to track improvements and changes to engine, editor, importer and scene loading startup times.
@reduz reduz requested a review from a team as a code owner August 19, 2022 12:25
@RandomShaper
Copy link
Copy Markdown
Member

Is this really needed in pure release? For the export templates, maybe having it in release_debug (and debug) is enough.

@reduz reduz changed the title Add Startup benchmarking support Add startup benchmarking support Aug 19, 2022
@reduz
Copy link
Copy Markdown
Member Author

reduz commented Aug 19, 2022

@RandomShaper Well maybe, I also wanted to send this information via debugger too, so you can check this information when you run the game remotely or on device. But definitely another PR will need to be done.

@Calinou
Copy link
Copy Markdown
Member

Calinou commented Aug 19, 2022

Could shutdown times be measured as well? While not as important as startup, I feel it's useful to track regressions there too.

@Calinou Calinou added this to the 4.0 milestone Aug 19, 2022
@reduz
Copy link
Copy Markdown
Member Author

reduz commented Aug 19, 2022

@Calinou Maybe in a separate PR, since its different type of code.

Copy link
Copy Markdown
Member

@RandomShaper RandomShaper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming the point of the startup sequence where the FS scan is triggered is equivalent. So, looks good to me.

@fire
Copy link
Copy Markdown
Member

fire commented Aug 20, 2022

Might be helpful to output to stdout only without a file path.

Copy link
Copy Markdown
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@akien-mga akien-mga merged commit 1fbf7b1 into godotengine:master Aug 22, 2022
@akien-mga
Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants