# HG changeset patch # User Chris Cannam # Date 1589470521 -3600 # Node ID ecd3152750a5517f21f8b803701509386243359a # Parent db489a1ece9bba3398fb4c8e66f4f72a6716cbad Print results in the opposite order, so most relevant ones are at the end of the listing diff -r db489a1ece9b -r ecd3152750a5 base/Profiler.cpp --- a/base/Profiler.cpp Mon May 11 17:27:18 2020 +0100 +++ b/base/Profiler.cpp Thu May 14 16:35:21 2020 +0100 @@ -138,11 +138,10 @@ } - fprintf(stderr, "\nBy total:\n"); - for (TimeRMap::const_iterator i = totmap.end(); i != totmap.begin(); ) { + fprintf(stderr, "\nBy number of calls:\n"); + for (IntRMap::const_iterator i = ncallmap.end(); i != ncallmap.begin(); ) { --i; - fprintf(stderr, "%-40s %s ms\n", i->second, - (i->first * 1000).toString().c_str()); + fprintf(stderr, "%-40s %d\n", i->second, i->first); } fprintf(stderr, "\nBy average:\n"); @@ -159,10 +158,11 @@ (i->first * 1000).toString().c_str()); } - fprintf(stderr, "\nBy number of calls:\n"); - for (IntRMap::const_iterator i = ncallmap.end(); i != ncallmap.begin(); ) { + fprintf(stderr, "\nBy total:\n"); + for (TimeRMap::const_iterator i = totmap.end(); i != totmap.begin(); ) { --i; - fprintf(stderr, "%-40s %d\n", i->second, i->first); + fprintf(stderr, "%-40s %s ms\n", i->second, + (i->first * 1000).toString().c_str()); } #endif