diff options
author | Zhizhou Yang <zhizhouy@google.com> | 2017-07-21 16:06:55 -0700 |
---|---|---|
committer | Zhizhou Yang <zhizhouy@google.com> | 2017-07-21 16:10:53 -0700 |
commit | 4307f4735e9a4e3189e8d43f7493bb677a4d06ba (patch) | |
tree | bf139ee25415cecde142e95791edba3803b2452a /crosperf/suite_runner.py | |
parent | 7091edfaa0ec531905b7d914e9307cd74caf02ea (diff) | |
parent | 978b96a8b02935d40e3a2c57cd033dbedd8980e9 (diff) | |
download | toolchain-utils-4307f4735e9a4e3189e8d43f7493bb677a4d06ba.tar.gz |
Merge branch 'aosp/mirror-chromium-master' into update_utilsandroid-o-iot-preview-5o-iot-preview-5
Update toolchain_utils from ChromeOS side, which includes: initializing
Android toolchain benchmark suite and other changes since last merging.
Bug: None.
Test: None.
Change-Id: I9cd74f4377a8109872414636342be0b9f5df2db5
Diffstat (limited to 'crosperf/suite_runner.py')
-rw-r--r-- | crosperf/suite_runner.py | 52 |
1 files changed, 28 insertions, 24 deletions
diff --git a/crosperf/suite_runner.py b/crosperf/suite_runner.py index 678113a7..bd27f282 100644 --- a/crosperf/suite_runner.py +++ b/crosperf/suite_runner.py @@ -78,8 +78,8 @@ class SuiteRunner(object): (benchmark.name, i)) break else: - self.logger.LogOutput('benchmark %s succeded on first try' % - benchmark.name) + self.logger.LogOutput( + 'benchmark %s succeded on first try' % benchmark.name) break return ret_tup @@ -88,32 +88,37 @@ class SuiteRunner(object): # pyformat: disable set_cpu_freq = ( 'set -e && ' + # Disable Turbo in Intel pstate driver + 'if [[ -e /sys/devices/system/cpu/intel_pstate/no_turbo ]]; then ' + 'echo -n 1 > /sys/devices/system/cpu/intel_pstate/no_turbo; fi; ' + # Set governor to performance for each cpu 'for f in /sys/devices/system/cpu/cpu*/cpufreq; do ' 'cd $f; ' - 'val=0; ' - 'if [[ -e scaling_available_frequencies ]]; then ' - # pylint: disable=line-too-long - ' val=`cat scaling_available_frequencies | tr " " "\\n" | sort -n -b -r`; ' - 'else ' - ' val=`cat scaling_max_freq | tr " " "\\n" | sort -n -b -r`; fi ; ' - 'set -- $val; ' - 'highest=$1; ' - 'if [[ $# -gt 1 ]]; then ' - ' case $highest in *1000) highest=$2;; esac; ' - 'fi ;' - 'echo $highest > scaling_max_freq; ' - 'echo $highest > scaling_min_freq; ' 'echo performance > scaling_governor; ' + # Uncomment rest of lines to enable setting frequency by crosperf + #'val=0; ' + #'if [[ -e scaling_available_frequencies ]]; then ' + # pylint: disable=line-too-long + #' val=`cat scaling_available_frequencies | tr " " "\\n" | sort -n -b -r`; ' + #'else ' + #' val=`cat scaling_max_freq | tr " " "\\n" | sort -n -b -r`; fi ; ' + #'set -- $val; ' + #'highest=$1; ' + #'if [[ $# -gt 1 ]]; then ' + #' case $highest in *1000) highest=$2;; esac; ' + #'fi ;' + #'echo $highest > scaling_max_freq; ' + #'echo $highest > scaling_min_freq; ' 'done' ) # pyformat: enable if self.log_level == 'average': - self.logger.LogOutput('Pinning governor execution frequencies for %s' % - machine_name) + self.logger.LogOutput( + 'Pinning governor execution frequencies for %s' % machine_name) ret = self._ce.CrosRunCommand( set_cpu_freq, machine=machine_name, chromeos_root=chromeos_root) - self.logger.LogFatalIf(ret, 'Could not pin frequencies on machine: %s' % - machine_name) + self.logger.LogFatalIf( + ret, 'Could not pin frequencies on machine: %s' % machine_name) def DecreaseWaitTime(self, machine_name, chromeos_root): """Change the ten seconds wait time for pagecycler to two seconds.""" @@ -218,11 +223,10 @@ class SuiteRunner(object): args_string = "test_args='%s'" % test_args cmd = ('{} {} {} --board={} --args="{} run_local={} test={} ' - '{}" {} telemetry_Crosperf'.format(TEST_THAT_PATH, autotest_dir_arg, - fast_arg, label.board, - args_string, benchmark.run_local, - benchmark.test_name, - profiler_args, machine)) + '{}" {} telemetry_Crosperf'.format( + TEST_THAT_PATH, autotest_dir_arg, fast_arg, label.board, + args_string, benchmark.run_local, benchmark.test_name, + profiler_args, machine)) # Use --no-ns-pid so that cros_sdk does not create a different # process namespace and we can kill process created easily by their |