Add Startup benchmarking support

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.
This commit is contained in:
Juan Linietsky
2022-08-19 14:21:43 +02:00
parent 35cfaafda8
commit a3936adb29
6 changed files with 124 additions and 5 deletions

View File

@ -79,6 +79,11 @@ 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();
@ -151,6 +156,11 @@ 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() {}
};