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

Unified Diff: tools/android/memdump/memreport.py

Issue 243403003: [Android] Change object types from AndroidCommands to DeviceUtils everywhere else. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 8 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 | « chrome/test/chromedriver/test/test_environment.py ('k') | tools/android/mempressure.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/memdump/memreport.py
diff --git a/tools/android/memdump/memreport.py b/tools/android/memdump/memreport.py
index 1782d6a5c4e1cd3cfe177a6fa48f1f96a76aa49c..41301c7cd92e60a96ea89dabfc0fead39deab1f8 100755
--- a/tools/android/memdump/memreport.py
+++ b/tools/android/memdump/memreport.py
@@ -18,8 +18,8 @@ from string import Template
sys.path.append(os.path.join(sys.path[0], os.pardir, os.pardir, os.pardir,
'build','android'))
-from pylib import android_commands
from pylib import constants
+from pylib.device import device_utils
_ENTRIES = [
@@ -205,10 +205,10 @@ def _RunManualGraph(package_name, interval):
def _CollectStats(count):
- adb = android_commands.AndroidCommands()
- pid_list = adb.ExtractPid(package_name)
- memdump = adb.RunShellCommand('/data/local/tmp/memdump ' +
- ' '.join(pid_list))
+ device = device_utils.DeviceUtils()
+ pid_list = device.old_interface.ExtractPid(package_name)
+ memdump = device.old_interface.RunShellCommand(
+ '/data/local/tmp/memdump ' + ' '.join(pid_list))
process_stats = _CollectMemoryStats(memdump,
[value for (key, value) in _ENTRIES])
for (pid, process) in zip(pid_list, process_stats):
« no previous file with comments | « chrome/test/chromedriver/test/test_environment.py ('k') | tools/android/mempressure.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698