aboutsummaryrefslogtreecommitdiff
path: root/crosperf/experiment_factory.py
diff options
context:
space:
mode:
authorZhizhou Yang <zhizhouy@google.com>2019-01-23 11:00:55 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-01-24 14:33:28 -0800
commit1bc9e7cbe541f9dae39d78c6a086078a75fd20b4 (patch)
treeab78e4e7486b9e8becb8d6ad575f064a5b6eff29 /crosperf/experiment_factory.py
parent1f3c5d01027b8925ad4287d0afef4d25af165699 (diff)
downloadtoolchain-utils-1bc9e7cbe541f9dae39d78c6a086078a75fd20b4.tar.gz
crosperf: allow weight in cwp approximation larger than 1
This patch changed the check on the weight in cwp approximation mode. The weight should be a float no less than 0. BUG=chromium:924593 TEST=Tested with a simple experiment on eve. Change-Id: Ia5ef804b5f11e36f6b5066fba6f40855bd716d2f Reviewed-on: https://chromium-review.googlesource.com/1431272 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Zhizhou Yang <zhizhouy@google.com> Reviewed-by: Luis Lozano <llozano@chromium.org>
Diffstat (limited to 'crosperf/experiment_factory.py')
-rw-r--r--crosperf/experiment_factory.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/crosperf/experiment_factory.py b/crosperf/experiment_factory.py
index 20e0fdba..3a1efb83 100644
--- a/crosperf/experiment_factory.py
+++ b/crosperf/experiment_factory.py
@@ -205,8 +205,8 @@ class ExperimentFactory(object):
if run_local:
raise RuntimeError('run_local must be set to False to use CWP '
'approximation')
- if weight > 1 or weight < 0:
- raise RuntimeError('Weight should be a float between 0 and 1')
+ if weight < 0:
+ raise RuntimeError('Weight should be a float no less than 0')
elif cwp_dso:
raise RuntimeError('With DSO specified, each benchmark should have a '
'weight')