Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Unified Diff: build/android/pylib/perf_tests_helper.py

Issue 16357016: AndroidParf: log max CPU index when running tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/perf_tests_helper.py
diff --git a/build/android/pylib/perf_tests_helper.py b/build/android/pylib/perf_tests_helper.py
index cb4085035d8f77e36b5c35014e8dad371d0bdbcb..e510eb40d64d1abe3e47472c1c84b20d3f47ef97 100644
--- a/build/android/pylib/perf_tests_helper.py
+++ b/build/android/pylib/perf_tests_helper.py
@@ -7,6 +7,7 @@ import sys
import android_commands
import json
+import logging
import math
# Valid values of result type.
@@ -152,9 +153,10 @@ class PerfControl(object):
def __init__(self, adb):
self._adb = adb
kernel_max = self._adb.GetFileContents('/sys/devices/system/cpu/kernel_max',
- log_result=False)
+ log_result=False)
assert kernel_max, 'Unable to find /sys/devices/system/cpu/kernel_max'
self._kernel_max = int(kernel_max[0])
+ logging.info('Maximum CPU index: %d' % self._kernel_max)
self._original_scaling_governor = self._adb.GetFileContents(
PerfControl._SCALING_GOVERNOR_FMT % 0,
log_result=False)[0]
@@ -183,4 +185,6 @@ class PerfControl(object):
for cpu in range(self._kernel_max + 1):
scaling_governor_file = PerfControl._SCALING_GOVERNOR_FMT % cpu
if self._adb.FileExistsOnDevice(scaling_governor_file):
+ logging.info('Writing scaling governor mode \'%s\' -> %s' %
+ (value, scaling_governor_file))
self._adb.SetProtectedFileContents(scaling_governor_file, value)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698