Patchwork D7742: perf: fix the time measurement for pathcopies relative to p2

login
register
mail settings
Submitter phabricator
Date Dec. 27, 2019, 9:17 p.m.
Message ID <differential-rev-PHID-DREV-cz7pllp3wukauhih4yx2-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/44071/
State Superseded
Headers show

Comments

phabricator - Dec. 27, 2019, 9:17 p.m.
mharbison72 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  PyCharm flagged this as unused.  But it seems more likely that it was intended
  to reset the time for the p2 path.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D7742

AFFECTED FILES
  contrib/perf.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -2048,8 +2048,8 @@ 
                 data['p1.time'] = end - begin
                 begin = util.timer()
                 p2renames = copies.pathcopies(b, p2)
+                end = util.timer()
                 data['p2.time'] = end - begin
-                end = util.timer()
                 data['p1.renamedfiles'] = len(p1renames)
                 data['p2.renamedfiles'] = len(p2renames)