# HG changeset patch
# User Boris Feld <boris.f...@octobus.net>
# Date 1541462254 -3600
#      Tue Nov 06 00:57:34 2018 +0100
# Node ID 24f71fdc0551dffb59ad2c29c1183d747122ab64
# Parent  fd1ce4514534dc539c2f00afb4340e0ae575d30f
# EXP-Topic revlog-perf
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 
24f71fdc0551
perf: only display the total time for perfrevlogwrite if quiet

This provide a simple way to get an overview of the total performance.

diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -1632,10 +1632,11 @@ def perfrevlogwrite(ui, repo, file_=None
         ("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
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to