You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
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.
This commit is contained in:
@@ -86,7 +86,7 @@ void EditorProfiler::add_frame_metric(const Metric &p_metric, bool p_final) {
|
|||||||
|
|
||||||
void EditorProfiler::clear() {
|
void EditorProfiler::clear() {
|
||||||
int metric_size = EditorSettings::get_singleton()->get("debugger/profiler_frame_history_size");
|
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.clear();
|
||||||
frame_metrics.resize(metric_size);
|
frame_metrics.resize(metric_size);
|
||||||
total_metrics = 0;
|
total_metrics = 0;
|
||||||
@@ -660,7 +660,7 @@ EditorProfiler::EditorProfiler() {
|
|||||||
h_split->add_child(graph);
|
h_split->add_child(graph);
|
||||||
graph->set_h_size_flags(SIZE_EXPAND_FILL);
|
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_metrics.resize(metric_size);
|
||||||
|
|
||||||
EDITOR_DEF("debugger/profiler_frame_max_functions", 64);
|
EDITOR_DEF("debugger/profiler_frame_max_functions", 64);
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ void EditorVisualProfiler::add_frame_metric(const Metric &p_metric) {
|
|||||||
|
|
||||||
void EditorVisualProfiler::clear() {
|
void EditorVisualProfiler::clear() {
|
||||||
int metric_size = EditorSettings::get_singleton()->get("debugger/profiler_frame_history_size");
|
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.clear();
|
||||||
frame_metrics.resize(metric_size);
|
frame_metrics.resize(metric_size);
|
||||||
last_metric = -1;
|
last_metric = -1;
|
||||||
@@ -789,7 +789,7 @@ EditorVisualProfiler::EditorVisualProfiler() {
|
|||||||
h_split->add_child(graph);
|
h_split->add_child(graph);
|
||||||
graph->set_h_size_flags(SIZE_EXPAND_FILL);
|
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_metrics.resize(metric_size);
|
||||||
|
|
||||||
frame_delay = memnew(Timer);
|
frame_delay = memnew(Timer);
|
||||||
|
|||||||
@@ -714,7 +714,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
|||||||
EDITOR_SETTING_USAGE(Variant::STRING, PROPERTY_HINT_GLOBAL_FILE, "network/ssl/editor_ssl_certificates", _SYSTEM_CERTS_PATH, "*.crt,*.pem", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
|
EDITOR_SETTING_USAGE(Variant::STRING, PROPERTY_HINT_GLOBAL_FILE, "network/ssl/editor_ssl_certificates", _SYSTEM_CERTS_PATH, "*.crt,*.pem", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
|
||||||
|
|
||||||
// Profiler
|
// Profiler
|
||||||
_initial_set("debugger/profiler_frame_history_size", 600);
|
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "debugger/profiler_frame_history_size", 3600, "60,10000,1")
|
||||||
|
|
||||||
// HTTP Proxy
|
// HTTP Proxy
|
||||||
_initial_set("network/http_proxy/host", "");
|
_initial_set("network/http_proxy/host", "");
|
||||||
|
|||||||
Reference in New Issue
Block a user