Show More
@@ -791,15 +791,21 b' def perfphases(ui, repo, **opts):' | |||
|
791 | 791 | timer(d) |
|
792 | 792 | fm.end() |
|
793 | 793 | |
|
794 |
@command('perfmanifest', |
|
|
795 | def perfmanifest(ui, repo, rev, **opts): | |
|
794 | @command('perfmanifest',[ | |
|
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 | 799 | """benchmark the time to read a manifest from disk and return a usable |
|
797 | 800 | dict-like object |
|
798 | 801 | |
|
799 | 802 | Manifest caches are cleared before retrieval.""" |
|
800 | 803 | timer, fm = gettimer(ui, opts) |
|
801 | ctx = scmutil.revsingle(repo, rev, rev) | |
|
802 | t = ctx.manifestnode() | |
|
804 | if not manifest_rev: | |
|
805 | ctx = scmutil.revsingle(repo, rev, rev) | |
|
806 | t = ctx.manifestnode() | |
|
807 | else: | |
|
808 | t = repo.manifestlog._revlog.lookup(rev) | |
|
803 | 809 | def d(): |
|
804 | 810 | repo.manifestlog.clearcaches() |
|
805 | 811 | repo.manifestlog[t].read() |
General Comments 0
You need to be logged in to leave comments.
Login now