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

Unified Diff: build/android/pylib/device/device_utils.py

Issue 404993004: [Android] Switch to DeviceUtils versions of GetMemoryUsageForPid and __str__. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 | build/android/pylib/device/device_utils_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/device/device_utils.py
diff --git a/build/android/pylib/device/device_utils.py b/build/android/pylib/device/device_utils.py
index 33d6351ae464bb86f65f43bb07a3adaed519bee0..c8ec5055dc17e59cb022b9501c000fce4e765d94 100644
--- a/build/android/pylib/device/device_utils.py
+++ b/build/android/pylib/device/device_utils.py
@@ -725,6 +725,23 @@ class DeviceUtils(object):
"""
return self.old_interface.GetIoStats()
+ @decorators.WithTimeoutAndRetriesFromInstance()
+ def GetMemoryUsageForPid(self, pid, timeout=None, retries=None):
+ """Gets the memory usage for the given PID.
+
+ Args:
+ pid: An integer containing the PID to get the memory usage for.
frankf 2014/07/23 16:39:44 you can shorten this to : "PID of the process"
jbudorick 2014/07/23 18:09:44 Done.
+ timeout: timeout in seconds
+ retries: number of retries
+ Returns:
tonyg 2014/07/21 16:02:09 You should keep it this way in this patch for cons
jbudorick 2014/07/23 18:09:43 Changed throughout the file.
+ A 2-tuple containing:
+ - A dict containing the overall memory usage statistics for the PID.
+ - A dict containing memory usage statistics broken down by mapping.
+ Raises:
+ CommandTimeoutError on timeout.
+ """
+ return self.old_interface.GetMemoryUsageForPid(pid)
+
def __str__(self):
"""Returns the device serial."""
return self.old_interface.GetDevice()
« no previous file with comments | « no previous file | build/android/pylib/device/device_utils_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698