| 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 from perf_tools import histogram_measurement | 4 from perf_tools import histogram_measurement |
| 5 from telemetry.page import multi_page_benchmark | 5 from telemetry import multi_page_benchmark |
| 6 | 6 |
| 7 MEMORY_HISTOGRAMS = [ | 7 MEMORY_HISTOGRAMS = [ |
| 8 {'name': 'V8.MemoryExternalFragmentationTotal', 'units': 'percent'}, | 8 {'name': 'V8.MemoryExternalFragmentationTotal', 'units': 'percent'}, |
| 9 {'name': 'V8.MemoryHeapSampleTotalCommitted', 'units': 'kb'}, | 9 {'name': 'V8.MemoryHeapSampleTotalCommitted', 'units': 'kb'}, |
| 10 {'name': 'V8.MemoryHeapSampleTotalUsed', 'units': 'kb'}, | 10 {'name': 'V8.MemoryHeapSampleTotalUsed', 'units': 'kb'}, |
| 11 {'name': 'Memory.RendererUsed', 'units': 'kb'}] | 11 {'name': 'Memory.RendererUsed', 'units': 'kb'}] |
| 12 | 12 |
| 13 BROWSER_MEMORY_HISTOGRAMS = [ | 13 BROWSER_MEMORY_HISTOGRAMS = [ |
| 14 {'name': 'Memory.BrowserUsed', 'units': 'kb'}] | 14 {'name': 'Memory.BrowserUsed', 'units': 'kb'}] |
| 15 | 15 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 38 # pages. | 38 # pages. |
| 39 options.AppendExtraBrowserArg('--disable-histogram-customizer') | 39 options.AppendExtraBrowserArg('--disable-histogram-customizer') |
| 40 options.AppendExtraBrowserArg('--memory-metrics') | 40 options.AppendExtraBrowserArg('--memory-metrics') |
| 41 | 41 |
| 42 def CanRunForPage(self, page): | 42 def CanRunForPage(self, page): |
| 43 return hasattr(page, 'stress_memory') | 43 return hasattr(page, 'stress_memory') |
| 44 | 44 |
| 45 def MeasurePage(self, page, tab, results): | 45 def MeasurePage(self, page, tab, results): |
| 46 for h in self.histograms: | 46 for h in self.histograms: |
| 47 h.GetValue(page, tab, results) | 47 h.GetValue(page, tab, results) |
| OLD | NEW |