changeset 40552:c63081cd3902

perf: only display the total time for perfrevlogwrite if quiet This provide a simple way to get an overview of the total performance.
author Boris Feld <boris.feld@octobus.net>
date Tue, 06 Nov 2018 00:57:34 +0100
parents 4dd7edeb3da9
children 631011ff6771
files contrib/perf.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/perf.py	Wed Oct 03 11:04:57 2018 +0200
+++ b/contrib/perf.py	Tue Nov 06 00:57:34 2018 +0100
@@ -1632,10 +1632,11 @@
         ("99%", resultcount * 99 // 100),
         ("max", -1),
     ]
-    for name, idx in relevants:
-        data = results[idx]
-        title = '%s of %d, rev %d' % (name, resultcount, data[0])
-        formatone(fm, data[1], title=title, displayall=displayall)
+    if not ui.quiet:
+        for name, idx in relevants:
+            data = results[idx]
+            title = '%s of %d, rev %d' % (name, resultcount, data[0])
+            formatone(fm, data[1], title=title, displayall=displayall)
 
     # XXX summing that many float will not be very precise, we ignore this fact
     # for now