##// END OF EJS Templates
debug: allow specifying a manifest node rather than a revision
Martijn Pieters -
r38802:ddb15a83 default
parent child Browse files
Show More
@@ -791,15 +791,21 b' def perfphases(ui, repo, **opts):'
791 timer(d)
791 timer(d)
792 fm.end()
792 fm.end()
793
793
794 @command('perfmanifest', [], 'REV')
794 @command('perfmanifest',[
795 def perfmanifest(ui, repo, rev, **opts):
795 ('m', 'manifest-rev', False, 'Look up a manifest node revision'),
796 ('', 'clear-disk', False, 'clear on-disk caches too'),
797 ], 'REV|NODE')
798 def perfmanifest(ui, repo, rev, manifest_rev=False, clear_disk=False, **opts):
796 """benchmark the time to read a manifest from disk and return a usable
799 """benchmark the time to read a manifest from disk and return a usable
797 dict-like object
800 dict-like object
798
801
799 Manifest caches are cleared before retrieval."""
802 Manifest caches are cleared before retrieval."""
800 timer, fm = gettimer(ui, opts)
803 timer, fm = gettimer(ui, opts)
804 if not manifest_rev:
801 ctx = scmutil.revsingle(repo, rev, rev)
805 ctx = scmutil.revsingle(repo, rev, rev)
802 t = ctx.manifestnode()
806 t = ctx.manifestnode()
807 else:
808 t = repo.manifestlog._revlog.lookup(rev)
803 def d():
809 def d():
804 repo.manifestlog.clearcaches()
810 repo.manifestlog.clearcaches()
805 repo.manifestlog[t].read()
811 repo.manifestlog[t].read()
General Comments 0
You need to be logged in to leave comments. Login now