contrib/perf.py
changeset 23485 ccb93e9affc1
parent 23171 8afae1d5d108
child 23533 891aaa7c0c70
equal deleted inserted replaced
23484:cf3495dfd7ed 23485:ccb93e9affc1
   523             timer(getbranchmap(name), title=str(name))
   523             timer(getbranchmap(name), title=str(name))
   524     finally:
   524     finally:
   525         branchmap.read = oldread
   525         branchmap.read = oldread
   526         branchmap.branchcache.write = oldwrite
   526         branchmap.branchcache.write = oldwrite
   527     fm.end()
   527     fm.end()
       
   528 
       
   529 @command('perfloadmarkers')
       
   530 def perfloadmarkers(ui, repo):
       
   531     """benchmark the time to parse the on-disk markers for a repo
       
   532 
       
   533     Result is the number of markers in the repo."""
       
   534     timer, fm = gettimer(ui)
       
   535     timer(lambda: len(obsolete.obsstore(repo.sopener)))
       
   536     fm.end()