changeset 43130: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	Tue Oct 08 01:49:34 2019 -0400
+++ b/contrib/perf.py	Tue Oct 08 02:19:04 2019 -0400
@@ -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()