contrib/perf.py
changeset 38254 6b91815fcdce
parent 38253 1b121cc680f2
child 38255 71d59b487d0c
equal deleted inserted replaced
38253:1b121cc680f2 38254:6b91815fcdce
   897     timer(moonwalk)
   897     timer(moonwalk)
   898     fm.end()
   898     fm.end()
   899 
   899 
   900 @command('perftemplating', formatteropts)
   900 @command('perftemplating', formatteropts)
   901 def perftemplating(ui, repo, *revs, **opts):
   901 def perftemplating(ui, repo, *revs, **opts):
       
   902     def format():
       
   903         commands.log(ui, repo, rev=revs, date='', user='',
       
   904                      template='{date|shortdate} [{rev}:{node|short}]'
       
   905                               ' {author|person}: {desc|firstline}\n')
       
   906 
   902     timer, fm = gettimer(ui, opts)
   907     timer, fm = gettimer(ui, opts)
   903     ui.pushbuffer()
   908     ui.pushbuffer()
   904     timer(lambda: commands.log(ui, repo, rev=revs, date='', user='',
   909     timer(format)
   905                                template='{date|shortdate} [{rev}:{node|short}]'
       
   906                                ' {author|person}: {desc|firstline}\n'))
       
   907     ui.popbuffer()
   910     ui.popbuffer()
   908     fm.end()
   911     fm.end()
   909 
   912 
   910 @command('perfcca', formatteropts)
   913 @command('perfcca', formatteropts)
   911 def perfcca(ui, repo, **opts):
   914 def perfcca(ui, repo, **opts):