Chromium Code Reviews| Index: tools/telemetry/telemetry/core/browser.py |
| diff --git a/tools/telemetry/telemetry/core/browser.py b/tools/telemetry/telemetry/core/browser.py |
| index a2a9fd5c274f08f21ca1f3772b780fc60f702eb0..7fbd9239a0bd45e70be317ce5835d077b450aefc 100644 |
| --- a/tools/telemetry/telemetry/core/browser.py |
| +++ b/tools/telemetry/telemetry/core/browser.py |
| @@ -168,6 +168,29 @@ class Browser(object): |
| return result |
| @property |
| + def cpu_stats(self): |
| + """Returns a dict of cpu statistics for the system. |
| + { 'Browser': { |
| + 'CpuProcessTime': S, |
| + 'TotalTime': T |
| + }, |
| + 'Gpu': {}, |
| + 'Renderer': { |
| + 'CpuProcessTime': S, |
| + 'TotalTime': T |
| + } |
| + } |
| + Any of the above keys may be missing on a per-platform basis. |
| + """ |
| + result = self._GetStatsCommon(self._platform_backend.GetCpuStats) |
| + del result['ProcessCount'] |
| + |
| + # We want a single time value, not the sum for all processes. |
| + for process_type in ['Browser', 'Renderer']: |
|
tonyg
2013/09/06 21:35:48
Why restrict to Browser/Renderer?
edmundyan
2013/09/06 22:21:37
No reason to. Fixed to be more general.
|
| + result[process_type].update(self._platform_backend.GetCpuTimestamp()) |
| + return result |
| + |
| + @property |
| def io_stats(self): |
| """Returns a dict of IO statistics for the browser: |
| { 'Browser': { |