##// END OF EJS Templates
perfbranchmap: add an option to purge the revbranch cache...
marmoute -
r32710:326c0e2c default
parent child Browse files
Show More
@@ -1309,8 +1309,10 b' def perfvolatilesets(ui, repo, *names, *'
1309 @command('perfbranchmap',
1309 @command('perfbranchmap',
1310 [('f', 'full', False,
1310 [('f', 'full', False,
1311 'Includes build time of subset'),
1311 'Includes build time of subset'),
1312 ('', 'clear-revbranch', False,
1313 'purge the revbranch cache between computation'),
1312 ] + formatteropts)
1314 ] + formatteropts)
1313 def perfbranchmap(ui, repo, full=False, **opts):
1315 def perfbranchmap(ui, repo, full=False, clear_revbranch=False, **opts):
1314 """benchmark the update of a branchmap
1316 """benchmark the update of a branchmap
1315
1317
1316 This benchmarks the full repo.branchmap() call with read and write disabled
1318 This benchmarks the full repo.branchmap() call with read and write disabled
@@ -1323,6 +1325,8 b' def perfbranchmap(ui, repo, full=False, '
1323 else:
1325 else:
1324 view = repo.filtered(filtername)
1326 view = repo.filtered(filtername)
1325 def d():
1327 def d():
1328 if clear_revbranch:
1329 repo.revbranchcache()._clear()
1326 if full:
1330 if full:
1327 view._branchcaches.clear()
1331 view._branchcaches.clear()
1328 else:
1332 else:
General Comments 0
You need to be logged in to leave comments. Login now