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

Unified Diff: tools/telemetry/telemetry/core/platform/android_platform_backend.py

Issue 1174633002: [Android] Use large_output for calls to "ps" and "dumpsys batterystats". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « build/android/pylib/device/battery_utils_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/platform/android_platform_backend.py
diff --git a/tools/telemetry/telemetry/core/platform/android_platform_backend.py b/tools/telemetry/telemetry/core/platform/android_platform_backend.py
index 7f16e834033cf3c8b6d829cba4ef1fe9afa0cd56..0464164ff26ee83c9b85e4fbe6092aced49122e0 100644
--- a/tools/telemetry/telemetry/core/platform/android_platform_backend.py
+++ b/tools/telemetry/telemetry/core/platform/android_platform_backend.py
@@ -44,7 +44,6 @@ from pylib.device import device_errors # pylint: disable=import-error
from pylib.perf import cache_control # pylint: disable=import-error
from pylib.perf import perf_control # pylint: disable=import-error
from pylib.perf import thermal_throttle # pylint: disable=import-error
-from pylib.utils import device_temp_file # pylint: disable=import-error
try:
from pylib.perf import surface_stats_collector # pylint: disable=import-error
@@ -386,11 +385,7 @@ class AndroidPlatformBackend(
command = 'ps'
if pid:
command += ' -p %d' % pid
- with device_temp_file.DeviceTempFile(self._device.adb) as ps_out:
- command += ' > %s' % ps_out.name
- self._device.RunShellCommand(command)
- # Get rid of trailing new line and header.
- ps = self._device.ReadFile(ps_out.name).split('\n')[1:-1]
+ ps = self._device.RunShellCommand(command, large_output=True)[1:]
output = []
for line in ps:
data = line.split()
« no previous file with comments | « build/android/pylib/device/battery_utils_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698