Implement cpu_stats for cros backend

BUG=286655

Review URL: https://chromiumcodereview.appspot.com/23902020

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222237 0039d316-1c4b-4281-b951-d872f2087c98
parent 9b004a34
......@@ -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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment