changeset 1856:ecd3152750a5

Print results in the opposite order, so most relevant ones are at the end of the listing
author Chris Cannam
date Thu, 14 May 2020 16:35:21 +0100
parents db489a1ece9b
children 14c776dad920
files base/Profiler.cpp
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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