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

Side by Side Diff: tools/telemetry/telemetry/core/platform/cros_platform_backend.py

Issue 17591003: Returns empty dict for GetIOStats on CrOS platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: try again Created 7 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 unified diff | Download patch
« no previous file with comments | « tools/telemetry/docs/telemetry.core.platform.cros_platform_backend.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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'
OLDNEW
« no previous file with comments | « tools/telemetry/docs/telemetry.core.platform.cros_platform_backend.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698