Improve startup benchmarking

Move the benchmarking measuring methods from `Engine` to `OS` to allow for platform specific overrides (e.g: can be used to hook into platform specific benchmarking and tracing capabilities).
This commit is contained in:
Fredia Huya-Kouadio
2023-01-13 11:24:12 -08:00
parent f581f21dd6
commit 831b4a5366
26 changed files with 386 additions and 129 deletions

View File

@ -83,11 +83,6 @@ private:
String write_movie_path;
String shader_cache_path;
Dictionary startup_benchmark_json;
String startup_benchmark_section;
uint64_t startup_benchmark_from = 0;
uint64_t startup_benchmark_total_from = 0;
public:
static Engine *get_singleton();
@ -163,11 +158,6 @@ public:
bool is_validation_layers_enabled() const;
int32_t get_gpu_index() const;
void startup_begin();
void startup_benchmark_begin_measure(const String &p_what);
void startup_benchmark_end_measure();
void startup_dump(const String &p_to_file);
Engine();
virtual ~Engine() {}
};