Skip to content

Commit f4c5e43

Browse files
author
Adrien GIVRY
committed
Reversing the order of entries in profiler reports
The ProfilerReport is containing a vector of `Action`. These actions were sorted by duration (From lowest to highest duration). However, when profiling, the longest action is generally the one we care more about, thus, actions are now stored from the highest duration to the lowest one. As a result, the profiler results are now shown in the editor in the correct order (Longest actions on top, shortest actions on bottom).
1 parent 440fc37 commit f4c5e43

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • Sources/Overload/OvAnalytics/src/OvAnalytics/Profiling

Sources/Overload/OvAnalytics/src/OvAnalytics/Profiling/Profiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ OvAnalytics::Profiling::ProfilerReport OvAnalytics::Profiling::Profiler::Generat
3838
report.elapsedFrames = __ELAPSED_FRAMES;
3939
report.elaspedTime = elapsed.count();
4040

41-
std::multimap<double, std::string> sortedHistory;
41+
std::multimap<double, std::string, std::greater<double>> sortedHistory;
4242

4343
/* Fill the sorted history with the current history (Auto sort) */
4444
for (auto& data : __ELPASED_HISTORY)

0 commit comments

Comments
 (0)