contrib/perf.py
changeset 40769 95f35c873463
parent 40768 f723014677a5
child 40770 b059388d976c
--- a/contrib/perf.py	Wed Nov 21 12:02:25 2018 +0000
+++ b/contrib/perf.py	Wed Nov 21 22:56:06 2018 +0100
@@ -2325,17 +2325,18 @@
     msg = b'benchmark of branchmap with %d revisions with %d new ones\n'
     ui.status(msg % (len(allbaserevs), len(newrevs)))
 
-    base = branchmap.branchcache()
-    base.update(repo, allbaserevs)
-
-    def setup():
-        x[0] = base.copy()
+    if True:
+        base = branchmap.branchcache()
+        base.update(repo, allbaserevs)
 
-    def bench():
-        x[0].update(repo, newrevs)
+        def setup():
+            x[0] = base.copy()
 
-    timer(bench, setup=setup)
-    fm.end()
+        def bench():
+            x[0].update(repo, newrevs)
+
+        timer(bench, setup=setup)
+        fm.end()
 
 @command(b'perfbranchmapload', [
      (b'f', b'filter', b'', b'Specify repoview filter'),