-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some editor startup benchmarks #81
Conversation
I'm not sure if this should be added a standard benchmark. It may be better done as a special benchmark that is implemented in
I suggest opening the same empty project that is created for benchmarking project startup/shutdown time, so that the number of files in the editor does not affect performance. If we use the main benchmarks project for that, performance would slow down as the project size increases, which could be misleading. Tracking performance in a project with 10,000+ files could be worth tracking separately, but it needs to remain constant over time. We can do both cold and warm shader cache tests this way, but I'd focus on warm shader cache tests first as they're the scenario most commonly encountered by users. It would then become an extra line on the results page's header: It could also be graphed independently on the homepage like other statistics (such as build time and binary size), although this hasn't been implemented yet. |
Git currently ignores the local .godot directories
This should now be Git friendly
8500dcb
to
ee0dadc
Compare
In that case, if I'm understanding To be honest, I am unsure how to test benchmarks that are in Alternatively, I also feel like the special run conditions can also be mitigated when running them inside the Godot Editor:
|
This can be done, but it's a lot of added complexity for a few benchmarks that I think not a lot of people will run locally anyway. The compilation benchmarks in particular can be difficult to set up as they require following distribution-specific instructions for installing dependencies to compile Godot. |
All right, I made an attempt to add the benchmarks to Results on my PC:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
My attempt to add the following benchmarks from #36:
I've only added these two benchmarks for starters so we can decide how we want to handle editor startup benchmarking.
The way I have implemented it, is that the benchmarks first create a
project.godot
file inuser://tmp
, and then call the Godot editor to open the project withOS.execute()
with the--quit
parameter, and the benchmark simply measures the time it takes for the editor to open and then close. For the shaders cached benchmark, the benchmark is copying all of the cached shader files from the godot-benchmark's.godot
directory itself into the temp project folder, and then deletes all the files and directories insideuser://tmp
. An issue with this is approach is that the time that it takes to copy and then delete the files is included in the benchmark, and I am worried this may be worse with benchmarks that have to do with multiple files, as we have to copy (or generate) them on the fly, and then delete them.Another approach would be to have smaller projects inside
supplemental/projects
where everything is already set up and we don't need to do any copying and deleting, but this would raise the size of the entire benchmarks project as we'd have multiple.godot
folders for each small project, and I'm not sure if we can make it work with git, as it ignores.godot
folders.I also assume that this wouldn't work on an exported project, because it's using
OS.get_executable_path()
to get the Godot path. Is this an issue? If it is, we'd need a way for the user to input the Godot path themselves.Results on my PC
{
"benchmarks": [
{
"category": "Startup > Editor",
"name": "Start Editor No Shader Cache",
"results": {
"time": 7968
}
},
{
"category": "Startup > Editor",
"name": "Start Editor Shader Cache",
"results": {
"time": 6357
}
}
],
"engine": {
"version": "v4.3.beta2.official",
"version_hash": "b75f0485ba15951b87f1d9a2d8dd0fcd55e178e4"
},
"system": {
"cpu_architecture": "x86_64",
"cpu_count": 12,
"cpu_name": "AMD Ryzen 5 1600 Six-Core Processor",
"os": "Linux"
}
}