1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

Make the performance reporting update frequency customizable

The default update frequency has been changed from 1000ms to 250ms.
This commit is contained in:
Hugo Locurcio
2018-05-17 02:02:35 +02:00
parent 942e0c4832
commit 228ae60a63
6 changed files with 21 additions and 8 deletions

View File

@@ -854,7 +854,7 @@ void ScriptDebuggerRemote::idle_poll() {
if (performance) {
uint64_t pt = OS::get_singleton()->get_ticks_msec();
if (pt - last_perf_time > 1000) {
if (pt - last_perf_time > update_frequency) {
last_perf_time = pt;
int max = performance->get("MONITOR_MAX");
@@ -1081,7 +1081,7 @@ ScriptDebuggerRemote::ScriptDebuggerRemote() :
eh.userdata = this;
add_error_handler(&eh);
profile_info.resize(CLAMP(int(ProjectSettings::get_singleton()->get("debug/settings/profiler/max_functions")), 128, 65535));
profile_info.resize(CLAMP(int(GLOBAL_GET("debug/settings/profiler/max_functions")), 128, 65535));
profile_info_ptrs.resize(profile_info.size());
}