summaryrefslogtreecommitdiffstats
path: root/core/config/engine.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2022-08-19 14:21:43 +0200
committerJuan Linietsky <reduzio@gmail.com>2022-08-19 14:21:43 +0200
commita3936adb2960c114d56842b8c124927bea56ae14 (patch)
tree4883fd55d94f59b2ee472411972e72df8ed60906 /core/config/engine.h
parent35cfaafda8073f700c9d2fe42a43d3d81eaaea67 (diff)
downloadredot-engine-a3936adb2960c114d56842b8c124927bea56ae14.tar.gz
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.
Diffstat (limited to 'core/config/engine.h')
-rw-r--r--core/config/engine.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/config/engine.h b/core/config/engine.h
index 649be23717..b4364dbda4 100644
--- a/core/config/engine.h
+++ b/core/config/engine.h
@@ -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() {}
};