Mercurial > hg
changeset 43003:bbf77341a956
perf: fix perfhelper-pathcopies without --stats
Some conditional were missing.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 27 Sep 2019 00:40:52 +0200 |
parents | 373749982924 |
children | c07812bdd568 |
files | contrib/perf.py |
diffstat | 1 files changed, 22 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/perf.py Fri Sep 27 19:59:53 2019 +0200 +++ b/contrib/perf.py Fri Sep 27 00:40:52 2019 +0200 @@ -1814,16 +1814,17 @@ b'nbrevs': len(repo.revs('%d::%d', b, p)), b'nbmissingfiles': len(missing), } - alldata['nbrevs'].append(( - data['nbrevs'], - base.hex(), - parent.hex(), - )) - alldata['nbmissingfiles'].append(( - data['nbmissingfiles'], - base.hex(), - parent.hex(), - )) + if dostats: + alldata['nbrevs'].append(( + data['nbrevs'], + base.hex(), + parent.hex(), + )) + alldata['nbmissingfiles'].append(( + data['nbmissingfiles'], + base.hex(), + parent.hex(), + )) if dotiming: begin = util.timer() renames = copies.pathcopies(base, parent) @@ -1831,16 +1832,17 @@ # not very stable timing since we did only one run data['time'] = end - begin data['nbrenamedfiles'] = len(renames) - alldata['time'].append(( - data['time'], - base.hex(), - parent.hex(), - )) - alldata['nbrenames'].append(( - data['nbrenamedfiles'], - base.hex(), - parent.hex(), - )) + if dostats: + alldata['time'].append(( + data['time'], + base.hex(), + parent.hex(), + )) + alldata['nbrenames'].append(( + data['nbrenamedfiles'], + base.hex(), + parent.hex(), + )) fm.startitem() fm.data(**data) out = data.copy()