From 0f28c94c9134f32a767f3e725f07969a634d5636 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sat, 28 May 2022 01:05:34 +0200 Subject: [PATCH] Increase the editor profiler frame history default and maximum limit The new default value (1800) allows storing 30 seconds of profiling at 60 FPS. The new maximum value (10000) allows storing about 3 minutes of profiling at 60 FPS. The profiler graph will scale accordingly to the chosen setting, so the default value is kept relatively low to prevent the graph from looking too squished on narrow displays. --- editor/editor_profiler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/editor_profiler.cpp b/editor/editor_profiler.cpp index a92f2b7bd..b8020d76c 100644 --- a/editor/editor_profiler.cpp +++ b/editor/editor_profiler.cpp @@ -97,7 +97,7 @@ void EditorProfiler::add_frame_metric(const Metric &p_metric, bool p_final) { void EditorProfiler::clear() { int metric_size = EditorSettings::get_singleton()->get("debugger/profiler_frame_history_size"); - metric_size = CLAMP(metric_size, 60, 1024); + metric_size = CLAMP(metric_size, 60, 10000); frame_metrics.clear(); frame_metrics.resize(metric_size); last_metric = -1; @@ -770,7 +770,7 @@ EditorProfiler::EditorProfiler() { h_split->add_child(graph); graph->set_h_size_flags(SIZE_EXPAND_FILL); - int metric_size = CLAMP(int(EDITOR_DEF("debugger/profiler_frame_history_size", 600)), 60, 1024); + int metric_size = CLAMP(int(EDITOR_DEF("debugger/profiler_frame_history_size", 1800)), 60, 10000); frame_metrics.resize(metric_size); last_metric = -1; hover_metric = -1;