diff options
-rw-r--r-- | tools/telemetry/telemetry/core/platform/cros_platform_backend.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/telemetry/telemetry/core/platform/cros_platform_backend.py b/tools/telemetry/telemetry/core/platform/cros_platform_backend.py index af2312f..62e3787 100644 --- a/tools/telemetry/telemetry/core/platform/cros_platform_backend.py +++ b/tools/telemetry/telemetry/core/platform/cros_platform_backend.py @@ -40,6 +40,14 @@ class CrosPlatformBackend(platform_backend.PlatformBackend): meminfo_contents = self._GetFileContents('/proc/meminfo') return proc_util.GetSystemCommitCharge(meminfo_contents) + def GetCpuStats(self, pid): + stats = self._GetFileContents('/proc/%s/stat' % pid).split() + return proc_util.GetCpuStats(stats) + + def GetCpuTimestamp(self): + timer_list = self._GetFileContents('/proc/timer_list') + return proc_util.GetTimestampJiffies(timer_list) + def GetMemoryStats(self, pid): status = self._GetFileContents('/proc/%s/status' % pid) stats = self._GetFileContents('/proc/%s/stat' % pid).split() |