Chromium Code Reviews| 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() |