changeset 43917:c88075eb28e3

perf: use `setup` function in `perfdirstatewrite` The command seems to pre-date the introduction of the `setup` support in timer. We move the line that is obviously about benchmark setup in such `setup` function.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 08 Oct 2019 02:19:04 -0400
parents 97f9ef777a75
children c17a63eb5d4c
files contrib/perf.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -1192,11 +1192,13 @@
     ds = repo.dirstate
     b"a" in ds
 
+    def setup():
+        ds._dirty = True
+
     def d():
-        ds._dirty = True
         ds.write(repo.currenttransaction())
 
-    timer(d)
+    timer(d, setup=setup)
     fm.end()