Comments
Patch
@@ -2274,17 +2274,18 @@ def perfbranchmapupdate(ui, repo, base=(
msg = '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'),