1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-06 19:41:11 +00:00

Merge pull request #87661 from baptr/profiler_sort

Fix editor profiler script function sort order
This commit is contained in:
Rémi Verschelde
2024-02-19 00:07:47 +01:00
2 changed files with 2 additions and 2 deletions

View File

@@ -350,7 +350,7 @@ void EditorProfiler::_update_frame() {
category->set_custom_color(0, _get_color_from_signature(m.categories[i].signature));
}
for (int j = m.categories[i].items.size() - 1; j >= 0; j--) {
for (int j = 0; j < m.categories[i].items.size(); j++) {
const Metric::Category::Item &it = m.categories[i].items[j];
if (it.internal == it.total && !display_internal_profiles->is_pressed() && m.categories[i].name == "Script Functions") {

View File

@@ -198,7 +198,7 @@ class ServersDebugger::ScriptsProfiler : public EngineProfiler {
typedef ServersDebugger::ScriptFunctionInfo FunctionInfo;
struct ProfileInfoSort {
bool operator()(ScriptLanguage::ProfilingInfo *A, ScriptLanguage::ProfilingInfo *B) const {
return A->total_time < B->total_time;
return A->total_time > B->total_time;
}
};
Vector<ScriptLanguage::ProfilingInfo> info;