diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-05-28 01:03:32 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-05-28 01:03:32 +0200 |
commit | 6c125020763971d24d7e70c0641f7adbc1607d5c (patch) | |
tree | b6ba0ed4b8784eb54e91237d654df912cfa6c879 /editor/debugger | |
parent | 1f690f197a4fb0809afb2f59bf78e4d3d89fd847 (diff) |
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.
Diffstat (limited to 'editor/debugger')
-rw-r--r-- | editor/debugger/editor_profiler.cpp | 4 | ||||
-rw-r--r-- | editor/debugger/editor_visual_profiler.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/editor/debugger/editor_profiler.cpp b/editor/debugger/editor_profiler.cpp index f2bb63e528..1b1cdbd9ef 100644 --- a/editor/debugger/editor_profiler.cpp +++ b/editor/debugger/editor_profiler.cpp @@ -86,7 +86,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); total_metrics = 0; @@ -660,7 +660,7 @@ EditorProfiler::EditorProfiler() { h_split->add_child(graph); graph->set_h_size_flags(SIZE_EXPAND_FILL); - int metric_size = CLAMP(int(EDITOR_GET("debugger/profiler_frame_history_size")), 60, 1024); + int metric_size = CLAMP(int(EDITOR_GET("debugger/profiler_frame_history_size")), 60, 10000); frame_metrics.resize(metric_size); EDITOR_DEF("debugger/profiler_frame_max_functions", 64); diff --git a/editor/debugger/editor_visual_profiler.cpp b/editor/debugger/editor_visual_profiler.cpp index 503c03bafe..9def646f3f 100644 --- a/editor/debugger/editor_visual_profiler.cpp +++ b/editor/debugger/editor_visual_profiler.cpp @@ -93,7 +93,7 @@ void EditorVisualProfiler::add_frame_metric(const Metric &p_metric) { void EditorVisualProfiler::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; @@ -789,7 +789,7 @@ EditorVisualProfiler::EditorVisualProfiler() { h_split->add_child(graph); graph->set_h_size_flags(SIZE_EXPAND_FILL); - int metric_size = CLAMP(int(EDITOR_GET("debugger/profiler_frame_history_size")), 60, 1024); + int metric_size = CLAMP(int(EDITOR_GET("debugger/profiler_frame_history_size")), 60, 10000); frame_metrics.resize(metric_size); frame_delay = memnew(Timer); |