contrib/perf.py
changeset 27096 964df7b4fb1b
parent 27095 aaf4e2d77148
child 27097 b3e24a9c5f9b
equal deleted inserted replaced
27095:aaf4e2d77148 27096:964df7b4fb1b
   323     cl = repo.changelog
   323     cl = repo.changelog
   324     def d():
   324     def d():
   325         len(cl.read(x)[3])
   325         len(cl.read(x)[3])
   326     timer(d)
   326     timer(d)
   327     fm.end()
   327     fm.end()
   328 
       
   329 @command('perflookup', formatteropts)
       
   330 def perflookup(ui, repo, rev, **opts):
       
   331     timer, fm = gettimer(ui, opts)
       
   332 
   328 
   333 @command('perflookup', formatteropts)
   329 @command('perflookup', formatteropts)
   334 def perflookup(ui, repo, rev, **opts):
   330 def perflookup(ui, repo, rev, **opts):
   335     timer, fm = gettimer(ui, opts)
   331     timer, fm = gettimer(ui, opts)
   336     timer(lambda: len(repo.lookup(rev)))
   332     timer(lambda: len(repo.lookup(rev)))