diff options
Diffstat (limited to 'core/os/os.h')
-rw-r--r-- | core/os/os.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/core/os/os.h b/core/os/os.h index 09ed31b9ce..f2787d6381 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -76,6 +76,12 @@ class OS { RemoteFilesystemClient default_rfs; + // For tracking benchmark data + bool use_benchmark = false; + String benchmark_file; + HashMap<String, uint64_t> start_benchmark_from; + Dictionary startup_benchmark_json; + protected: void _set_logger(CompositeLogger *p_logger); @@ -299,6 +305,15 @@ public: virtual bool request_permissions() { return true; } virtual Vector<String> get_granted_permissions() const { return Vector<String>(); } + // For recording / measuring benchmark data. Only enabled with tools + void set_use_benchmark(bool p_use_benchmark); + bool is_use_benchmark_set(); + void set_benchmark_file(const String &p_benchmark_file); + String get_benchmark_file(); + virtual void benchmark_begin_measure(const String &p_what); + virtual void benchmark_end_measure(const String &p_what); + virtual void benchmark_dump(); + virtual void process_and_drop_events() {} virtual Error setup_remote_filesystem(const String &p_server_host, int p_port, const String &p_password, String &r_project_path); |