From f87fbf9cce6a6d732f0364b41fd0885337268bee Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 14 Sep 2018 15:47:37 +0200 Subject: Depsgraph: Gnuplot, put heaviest objects at the top --- source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source') diff --git a/source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc b/source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc index 47b4895942e..0ea9f564fb1 100644 --- a/source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc +++ b/source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc @@ -84,7 +84,7 @@ BLI_INLINE double get_node_time(const DebugContext& /*ctx*/, bool stat_entry_comparator(const StatsEntry& a, const StatsEntry& b) { - return a.time < b.time; + return a.time > b.time; } string gnuplotify_id_code(const string& name) @@ -125,6 +125,7 @@ void write_stats_data(const DebugContext& ctx) std::sort(stats.begin(), stats.end(), stat_entry_comparator); // We limit number of entries, otherwise things become unreadable. stats.resize(min_ii(stats.size(), 32)); + std::reverse(stats.begin(), stats.end()); // Print data to the file stream. deg_debug_fprintf(ctx, "$data << EOD" NL); foreach (const StatsEntry& entry, stats) { -- cgit v1.2.3