diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-09-14 16:47:37 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-09-17 12:19:42 +0300 |
commit | f87fbf9cce6a6d732f0364b41fd0885337268bee (patch) | |
tree | 444e28cc01d78881929c38032a24ed806cbefea3 /source | |
parent | 231a3845876d63e0b4f25365b422ecd031079c3a (diff) |
Depsgraph: Gnuplot, put heaviest objects at the top
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc | 3 |
1 files changed, 2 insertions, 1 deletions
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) { |