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

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

Issue 11876021: Support startup performance tests on Galaxy S3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 11 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
« build/android/pylib/flag_changer.py ('K') | « build/android/pylib/flag_changer.py ('k') | 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 bec92a20d2a1bcb308322ba658d08b5c7e304692..7ab30038b25257a21c38523399d75a0959e88960 100644
--- a/build/android/pylib/perf_tests_helper.py
+++ b/build/android/pylib/perf_tests_helper.py
@@ -133,15 +133,13 @@ class PerfTestSetup(object):
num_cpus = self._adb.GetFileContents('/sys/devices/system/cpu/online',
log_result=False)
assert num_cpus, 'Unable to find /sys/devices/system/cpu/online'
- self._num_cpus = int(num_cpus[0].split('-')[-1])
+ self._num_cpus = int(re.findall(r'\d+',num_cpus[0])[-1])
bulach 2013/01/14 17:26:50 nit: space after ,
aberent 2013/01/14 20:19:10 Done.
self._original_scaling_governor = None
def DropRamCaches(self):
"""Drops the filesystem ram caches for performance testing."""
- if not self._adb.IsRootEnabled():
- self._adb.EnableAdbRoot()
- self._adb.RunShellCommand('sync')
- self._adb.RunShellCommand('echo 3 > ' + PerfTestSetup._DROP_CACHES)
+ self._adb.RunShellCommand('su -c sync')
+ self._adb.RunShellCommand('su -c echo 3 > ' + PerfTestSetup._DROP_CACHES)
def SetUp(self):
"""Sets up performance tests."""
« build/android/pylib/flag_changer.py ('K') | « build/android/pylib/flag_changer.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698