contrib/perf.py
changeset 40721 0adc2c0a0792
parent 40720 0a3cc351d718
child 40731 36077a0f6f12
equal deleted inserted replaced
40720:0a3cc351d718 40721:0adc2c0a0792
   274     # experimental config: perf.all-timing
   274     # experimental config: perf.all-timing
   275     displayall = ui.configbool(b"perf", b"all-timing", False)
   275     displayall = ui.configbool(b"perf", b"all-timing", False)
   276     return functools.partial(_timer, fm, displayall=displayall), fm
   276     return functools.partial(_timer, fm, displayall=displayall), fm
   277 
   277 
   278 def stub_timer(fm, func, setup=None, title=None):
   278 def stub_timer(fm, func, setup=None, title=None):
       
   279     if setup is not None:
       
   280         setup()
   279     func()
   281     func()
   280 
   282 
   281 @contextlib.contextmanager
   283 @contextlib.contextmanager
   282 def timeone():
   284 def timeone():
   283     r = []
   285     r = []