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

Side by Side Diff: tools/perf/perf_tools/memory_measurement.py

Issue 15093008: Telemetry: integrates memory_measurement with TCMalloc dumps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/browser.py » ('j') | 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) 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_metric 4 from perf_tools import histogram_metric
5 from telemetry.page import page_measurement 5 from telemetry.page import page_measurement
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'},
(...skipping 28 matching lines...) Expand all
39 options.AppendExtraBrowserArg('--disable-histogram-customizer') 39 options.AppendExtraBrowserArg('--disable-histogram-customizer')
40 options.AppendExtraBrowserArg('--memory-metrics') 40 options.AppendExtraBrowserArg('--memory-metrics')
41 options.AppendExtraBrowserArg('--reduce-security-for-dom-automation-tests') 41 options.AppendExtraBrowserArg('--reduce-security-for-dom-automation-tests')
42 42
43 def CanRunForPage(self, page): 43 def CanRunForPage(self, page):
44 return hasattr(page, 'stress_memory') 44 return hasattr(page, 'stress_memory')
45 45
46 def MeasurePage(self, page, tab, results): 46 def MeasurePage(self, page, tab, results):
47 for h in self.histograms: 47 for h in self.histograms:
48 h.GetValue(page, tab, results) 48 h.GetValue(page, tab, results)
49
50 if tab.browser.is_profiler_active('tcmalloc-heap'):
51 # The tcmalloc_heap_profiler dumps files at regular
52 # intervals (~20 secs).
53 # This is a minor optimization to ensure it'll dump the last file when
54 # the test completes.
55 tab.ExecuteJavaScript("""
56 if (chrome && chrome.memoryBenchmarking) {
57 chrome.memoryBenchmarking.heapProfilerDump('final', 'renderer');
58 chrome.memoryBenchmarking.heapProfilerDump('final', 'browser');
59 }
60 """)
OLDNEW
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/browser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698