contrib/perf.py
changeset 41434 48394923fbdc
parent 41365 876494fd967d
child 41436 ab6d1f82be32
equal deleted inserted replaced
41433:3757a968d63a 41434:48394923fbdc
   533         cl._nodecache = {nullid: nullrev}
   533         cl._nodecache = {nullid: nullrev}
   534         cl._nodepos = None
   534         cl._nodepos = None
   535 
   535 
   536 @command(b'perfheads', formatteropts)
   536 @command(b'perfheads', formatteropts)
   537 def perfheads(ui, repo, **opts):
   537 def perfheads(ui, repo, **opts):
       
   538     """benchmark the computation of a changelog heads"""
   538     opts = _byteskwargs(opts)
   539     opts = _byteskwargs(opts)
   539     timer, fm = gettimer(ui, opts)
   540     timer, fm = gettimer(ui, opts)
   540     cl = repo.changelog
   541     cl = repo.changelog
   541     def d():
   542     def d():
   542         len(cl.headrevs())
   543         len(cl.headrevs())