# HG changeset patch # User Pierre-Yves David # Date 1570515544 14400 # Node ID c88075eb28e3281a4470fde929fbf5a13bda5f8a # Parent 97f9ef777a75ff2865c054eaf6b9cca92673001a 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. diff -r 97f9ef777a75 -r c88075eb28e3 contrib/perf.py --- 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()