Mercurial > hg
changeset 38730:69ed2cff4277
worker: rename variable to reflect constant
Differential Revision: https://phab.mercurial-scm.org/D3961
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 17 Jul 2018 16:57:27 -0700 |
parents | 9e6afe7fca31 |
children | ef3838a47503 |
files | mercurial/worker.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/worker.py Mon Jul 16 17:52:17 2018 -0700 +++ b/mercurial/worker.py Tue Jul 17 16:57:27 2018 -0700 @@ -62,16 +62,16 @@ return min(max(countcpus(), 4), 32) if pycompat.isposix or pycompat.iswindows: - _startupcost = 0.01 + _STARTUP_COST = 0.01 else: - _startupcost = 1e30 + _STARTUP_COST = 1e30 def worthwhile(ui, costperop, nops): '''try to determine whether the benefit of multiple processes can outweigh the cost of starting them''' linear = costperop * nops workers = _numworkers(ui) - benefit = linear - (_startupcost * workers + linear / workers) + benefit = linear - (_STARTUP_COST * workers + linear / workers) return benefit >= 0.15 def worker(ui, costperarg, func, staticargs, args):