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>
diff --git a/crosperf/experiment_factory.py b/crosperf/experiment_factory.py
index 20e0fdb..3a1efb8 100644
--- a/crosperf/experiment_factory.py
+++ b/crosperf/experiment_factory.py
@@ -205,8 +205,8 @@
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')