Improve engine startup/shutdown benchmarks

- Add contexts to give a better sense of benchmarked areas.
- Add missing benchmarks and adjust some begin/end points.
- Clean up names.
- Improve Android's internal benchmarks in a similar manner.

Co-authored-by: Fredia Huya-Kouadio <fhuya@meta.com>
This commit is contained in:
Yuri Sizov
2023-12-08 12:52:49 +01:00
parent d5ad37afcd
commit fc3f40f37d
19 changed files with 172 additions and 93 deletions

View File

@@ -107,7 +107,7 @@ Ref<FontVariation> make_bold_font(const Ref<Font> &p_font, double p_embolden, Ty
}
void editor_register_fonts(Ref<Theme> p_theme) {
OS::get_singleton()->benchmark_begin_measure("editor_register_fonts");
OS::get_singleton()->benchmark_begin_measure("EditorTheme", "Register Fonts");
Ref<DirAccess> dir = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
TextServer::FontAntialiasing font_antialiasing = (TextServer::FontAntialiasing)(int)EDITOR_GET("interface/editor/font_antialiasing");
@@ -445,5 +445,5 @@ void editor_register_fonts(Ref<Theme> p_theme) {
p_theme->set_font_size("status_source_size", EditorStringName(EditorFonts), default_font_size);
p_theme->set_font("status_source", EditorStringName(EditorFonts), mono_other_fc);
OS::get_singleton()->benchmark_end_measure("editor_register_fonts");
OS::get_singleton()->benchmark_end_measure("EditorTheme", "Register Fonts");
}