| OLD | NEW |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 from telemetry.core.platform import linux_platform_backend | 5 from telemetry.core.platform import linux_platform_backend |
| 6 | 6 |
| 7 | 7 |
| 8 class CrosPlatformBackend(linux_platform_backend.LinuxPlatformBackend): | 8 class CrosPlatformBackend(linux_platform_backend.LinuxPlatformBackend): |
| 9 | 9 |
| 10 def __init__(self, cri): | 10 def __init__(self, cri): |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 def _RunCommand(self, args): | 29 def _RunCommand(self, args): |
| 30 return self._cri.RunCmdOnDevice(args)[0] | 30 return self._cri.RunCmdOnDevice(args)[0] |
| 31 | 31 |
| 32 def _GetFileContents(self, filename): | 32 def _GetFileContents(self, filename): |
| 33 try: | 33 try: |
| 34 return self._cri.RunCmdOnDevice(['cat', filename])[0] | 34 return self._cri.RunCmdOnDevice(['cat', filename])[0] |
| 35 except AssertionError: | 35 except AssertionError: |
| 36 return '' | 36 return '' |
| 37 | 37 |
| 38 def GetIOStats(self, pid): |
| 39 # There is no '/proc/<pid>/io' file on CrOS platforms |
| 40 # Returns empty dict as it does in PlatformBackend. |
| 41 return {} |
| 42 |
| 38 def GetOSName(self): | 43 def GetOSName(self): |
| 39 return 'chromeos' | 44 return 'chromeos' |
| OLD | NEW |