contrib/perf.py
changeset 38693 9b6a708f2263
parent 38273 9df777d7f061
child 38694 55101513ed94
equal deleted inserted replaced
38692:3700564c63fe 38693:9b6a708f2263
   772     timer(d)
   772     timer(d)
   773     fm.end()
   773     fm.end()
   774 
   774 
   775 @command('perfmanifest', [], 'REV')
   775 @command('perfmanifest', [], 'REV')
   776 def perfmanifest(ui, repo, rev, **opts):
   776 def perfmanifest(ui, repo, rev, **opts):
       
   777     """benchmark the time to read a manifest from disk and return a usable
       
   778     dict-like object
       
   779 
       
   780     Manifest caches are cleared before retrieval."""
   777     timer, fm = gettimer(ui, opts)
   781     timer, fm = gettimer(ui, opts)
   778     ctx = scmutil.revsingle(repo, rev, rev)
   782     ctx = scmutil.revsingle(repo, rev, rev)
   779     t = ctx.manifestnode()
   783     t = ctx.manifestnode()
   780     def d():
   784     def d():
   781         repo.manifestlog.clearcaches()
   785         repo.manifestlog.clearcaches()