contrib/perf.py
changeset 40529 cf3bef7f162b
parent 40349 1524c305377f
child 40530 914079ee3334
--- a/contrib/perf.py	Tue May 22 15:26:17 2018 +0200
+++ b/contrib/perf.py	Tue Nov 06 11:13:31 2018 +0100
@@ -1790,10 +1790,10 @@
         (lambda: dohash(text), b'hash'),
     ]
 
+    timer, fm = gettimer(ui, opts)
     for fn, title in benches:
-        timer, fm = gettimer(ui, opts)
         timer(fn, title=title)
-        fm.end()
+    fm.end()
 
 @command(b'perfrevset',
          [(b'C', b'clear', False, b'clear volatile cache between each call.'),