--- a/contrib/perf.py Fri Jul 20 11:37:31 2018 -0700
+++ b/contrib/perf.py Tue Jul 31 19:37:48 2018 +0200
@@ -791,15 +791,21 @@
timer(d)
fm.end()
-@command('perfmanifest', [], 'REV')
-def perfmanifest(ui, repo, rev, **opts):
+@command('perfmanifest',[
+ ('m', 'manifest-rev', False, 'Look up a manifest node revision'),
+ ('', 'clear-disk', False, 'clear on-disk caches too'),
+ ], 'REV|NODE')
+def perfmanifest(ui, repo, rev, manifest_rev=False, clear_disk=False, **opts):
"""benchmark the time to read a manifest from disk and return a usable
dict-like object
Manifest caches are cleared before retrieval."""
timer, fm = gettimer(ui, opts)
- ctx = scmutil.revsingle(repo, rev, rev)
- t = ctx.manifestnode()
+ if not manifest_rev:
+ ctx = scmutil.revsingle(repo, rev, rev)
+ t = ctx.manifestnode()
+ else:
+ t = repo.manifestlog._revlog.lookup(rev)
def d():
repo.manifestlog.clearcaches()
repo.manifestlog[t].read()