aboutsummaryrefslogtreecommitdiff
path: root/crosperf/settings_factory.py
diff options
context:
space:
mode:
authorDenis Nikitin <denik@google.com>2019-09-13 12:25:57 -0700
committerDenis Nikitin <denik@chromium.org>2019-09-16 20:32:03 +0000
commit1b3c925ab0a395fdc256672b47abf7427a4498d0 (patch)
tree16a7356591c2eb5383ffa1b3fe353240fdc9b94b /crosperf/settings_factory.py
parent67a3a585354c03993cb5b5458f123844670f01dc (diff)
downloadtoolchain-utils-1b3c925ab0a395fdc256672b47abf7427a4498d0.tar.gz
crosperf: Setup CPU frequency
Added "cpu_freq_pct" in global settings specifying percent of the max frequency which will be set on DUT during benchmark run. The actual value will be chosen from available frequencies less than or equal to the calculated number. Feature requires scaling_available_frequencies. On the platforms not supporting scaling_available_frequencies "cpu_freq_pct" will be ignored. BUG=chromium:966514 TEST=Unittest and local HW tests on veyron, scarlet and kevin64 passed. Change-Id: I175e2836ecf02fcf6b93d196926c7801d7f016c0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1803780 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Denis Nikitin <denik@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Diffstat (limited to 'crosperf/settings_factory.py')
-rw-r--r--crosperf/settings_factory.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/crosperf/settings_factory.py b/crosperf/settings_factory.py
index b96ad342..1fbc8e14 100644
--- a/crosperf/settings_factory.py
+++ b/crosperf/settings_factory.py
@@ -360,7 +360,7 @@ class GlobalSettings(Settings):
required=False,
default=0,
description='Wait specified time in minutes allowing'
- ' CPU to cool down. Zero value disables cooldown,'))
+ ' CPU to cool down. Zero value disables cooldown.'))
self.AddField(
EnumField(
'governor',
@@ -396,6 +396,13 @@ class GlobalSettings(Settings):
' applicable only on ARM;\n'
'exclusive-cores - (for future use)'
' isolate cores for exclusive use of benchmark processes.'))
+ self.AddField(
+ IntegerField(
+ 'cpu_freq_pct',
+ required=False,
+ default=100,
+ description='Setup CPU frequency to a supported value less than'
+ ' or equal to a percent of max_freq.'))
class SettingsFactory(object):