aboutsummaryrefslogtreecommitdiff
path: root/crosperf/settings_factory.py
diff options
context:
space:
mode:
authorZhizhou Yang <zhizhouy@google.com>2018-11-09 11:44:10 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-11-13 03:32:49 -0800
commit1a199b1827d125b89c8cf66c8d5680bf14a1b857 (patch)
treefd963d10454b318e4c83f9627c2be3546a3a6a15 /crosperf/settings_factory.py
parentaa8d023f42fa991587e291e067820b2bbd6031a3 (diff)
downloadtoolchain-utils-1a199b1827d125b89c8cf66c8d5680bf14a1b857.tar.gz
crosperf: introduce cwp_dso and weight for CWP approximation
This patch does initial work to support CWP approximation in crosperf. It introduceds a global option cwp_dso, which is used to specify the type of DSO to use for approximation; an option weight in benchmark setting, which decides the weight of each benchmark in test. This patch also contains some value checks for these two options. BUG=chromium:902785 TEST=Passed all unit tests and sample tests locally. Change-Id: I565c4baf0630ce6c1b62ad0398d05a5f336aac6e Reviewed-on: https://chromium-review.googlesource.com/1323473 Commit-Ready: Zhizhou Yang <zhizhouy@google.com> Tested-by: Zhizhou Yang <zhizhouy@google.com> Reviewed-by: Caroline Tice <cmtice@chromium.org>
Diffstat (limited to 'crosperf/settings_factory.py')
-rw-r--r--crosperf/settings_factory.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/crosperf/settings_factory.py b/crosperf/settings_factory.py
index efbb534f..edf269c1 100644
--- a/crosperf/settings_factory.py
+++ b/crosperf/settings_factory.py
@@ -6,6 +6,7 @@
from __future__ import print_function
from field import BooleanField
+from field import FloatField
from field import IntegerField
from field import ListField
from field import TextField
@@ -51,6 +52,11 @@ class BenchmarkSettings(Settings):
'telemetry_Crosperf.',
required=False,
default=True))
+ self.AddField(
+ FloatField(
+ 'weight',
+ default=0.0,
+ description='Weight of the benchmark for CWP approximation'))
class LabelSettings(Settings):
@@ -286,6 +292,16 @@ class GlobalSettings(Settings):
default=0,
description='Number of times to retry a '
'benchmark run.'))
+ self.AddField(
+ TextField(
+ 'cwp_dso',
+ description='The DSO type that we want to use for '
+ 'CWP approximation. This is used to run telemetry '
+ 'benchmarks. Valid DSO types can be found from dso_list '
+ 'in experiment_factory.py. The default value is set to '
+ 'be empty.',
+ required=False,
+ default=''))
class SettingsFactory(object):