OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 import os | 5 import os |
6 | 6 |
7 from telemetry.core import browser_credentials | 7 from telemetry.core import browser_credentials |
8 from telemetry.core import exceptions | 8 from telemetry.core import exceptions |
9 from telemetry.core import extension_dict | 9 from telemetry.core import extension_dict |
10 from telemetry.core import platform | 10 from telemetry.core import platform |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 'WorkingSetSize': U, | 155 'WorkingSetSize': U, |
156 'WorkingSetSizePeak': V, | 156 'WorkingSetSizePeak': V, |
157 'ProportionalSetSize': W, | 157 'ProportionalSetSize': W, |
158 'PrivateDirty': X | 158 'PrivateDirty': X |
159 }, | 159 }, |
160 'SystemCommitCharge': Y, | 160 'SystemCommitCharge': Y, |
161 'ProcessCount': Z, | 161 'ProcessCount': Z, |
162 } | 162 } |
163 Any of the above keys may be missing on a per-platform basis. | 163 Any of the above keys may be missing on a per-platform basis. |
164 """ | 164 """ |
165 self._platform_backend.PurgeUnpinnedMemory() | |
166 result = self._GetStatsCommon(self._platform_backend.GetMemoryStats) | 165 result = self._GetStatsCommon(self._platform_backend.GetMemoryStats) |
167 result['SystemCommitCharge'] = \ | 166 result['SystemCommitCharge'] = \ |
168 self._platform_backend.GetSystemCommitCharge() | 167 self._platform_backend.GetSystemCommitCharge() |
169 return result | 168 return result |
170 | 169 |
171 @property | 170 @property |
172 def cpu_stats(self): | 171 def cpu_stats(self): |
173 """Returns a dict of cpu statistics for the system. | 172 """Returns a dict of cpu statistics for the system. |
174 { 'Browser': { | 173 { 'Browser': { |
175 'CpuProcessTime': S, | 174 'CpuProcessTime': S, |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 | 358 |
360 @property | 359 @property |
361 def supports_system_info(self): | 360 def supports_system_info(self): |
362 return self._browser_backend.supports_system_info | 361 return self._browser_backend.supports_system_info |
363 | 362 |
364 def GetSystemInfo(self): | 363 def GetSystemInfo(self): |
365 """Returns low-level information about the system, if available. | 364 """Returns low-level information about the system, if available. |
366 | 365 |
367 See the documentation of the SystemInfo class for more details.""" | 366 See the documentation of the SystemInfo class for more details.""" |
368 return self._browser_backend.GetSystemInfo() | 367 return self._browser_backend.GetSystemInfo() |
OLD | NEW |