contrib/perf.py
changeset 32710 326c0e2c1a1d
parent 32532 e4f514627514
child 32731 6f791ca70640
--- a/contrib/perf.py	Mon May 29 05:53:58 2017 +0200
+++ b/contrib/perf.py	Mon Jun 05 16:24:01 2017 +0100
@@ -1309,8 +1309,10 @@
 @command('perfbranchmap',
          [('f', 'full', False,
            'Includes build time of subset'),
+          ('', 'clear-revbranch', False,
+           'purge the revbranch cache between computation'),
          ] + formatteropts)
-def perfbranchmap(ui, repo, full=False, **opts):
+def perfbranchmap(ui, repo, full=False, clear_revbranch=False, **opts):
     """benchmark the update of a branchmap
 
     This benchmarks the full repo.branchmap() call with read and write disabled
@@ -1323,6 +1325,8 @@
         else:
             view = repo.filtered(filtername)
         def d():
+            if clear_revbranch:
+                repo.revbranchcache()._clear()
             if full:
                 view._branchcaches.clear()
             else: