equal
deleted
inserted
replaced
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 = [] |