perf: only display the total time for perfrevlogwrite if quiet
authorBoris Feld <boris.feld@octobus.net>
Tue, 06 Nov 2018 00:57:34 +0100
changeset 40552 c63081cd3902
parent 40551 4dd7edeb3da9
child 40553 631011ff6771
perf: only display the total time for perfrevlogwrite if quiet This provide a simple way to get an overview of the total performance.
contrib/perf.py
--- 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