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

Side by Side Diff: tools/perf/benchmarks/v8.py

Issue 2162283002: [telemetry] Trace config should be used to disable periodic dumps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/perf/benchmarks/system_health.py ('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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 import os 4 import os
5 import re 5 import re
6 6
7 from core import path_util 7 from core import path_util
8 from core import perf_benchmark 8 from core import perf_benchmark
9 from page_sets import google_pages 9 from page_sets import google_pages
10 10
11 from benchmarks import v8_helper 11 from benchmarks import v8_helper
12 12
13 from measurements import v8_detached_context_age_in_gc 13 from measurements import v8_detached_context_age_in_gc
14 from measurements import v8_gc_times 14 from measurements import v8_gc_times
15 import page_sets 15 import page_sets
16 from telemetry import benchmark 16 from telemetry import benchmark
17 from telemetry import story 17 from telemetry import story
18 from telemetry.timeline import chrome_trace_category_filter
18 from telemetry.timeline import chrome_trace_config 19 from telemetry.timeline import chrome_trace_config
19 from telemetry.timeline import chrome_trace_category_filter
20 from telemetry.web_perf import timeline_based_measurement 20 from telemetry.web_perf import timeline_based_measurement
21 21
22 22
23 def CreateV8TimelineBasedMeasurementOptions(): 23 def CreateV8TimelineBasedMeasurementOptions():
24 category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter() 24 category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter()
25 category_filter.AddIncludedCategory('v8') 25 category_filter.AddIncludedCategory('v8')
26 category_filter.AddIncludedCategory('blink.console') 26 category_filter.AddIncludedCategory('blink.console')
27 category_filter.AddDisabledByDefault('disabled-by-default-v8.compile') 27 category_filter.AddDisabledByDefault('disabled-by-default-v8.compile')
28 options = timeline_based_measurement.Options(category_filter) 28 options = timeline_based_measurement.Options(category_filter)
29 options.SetTimelineBasedMetrics(['executionMetric']) 29 options.SetTimelineBasedMetrics(['executionMetric'])
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 def Name(cls): 77 def Name(cls):
78 return 'v8.detached_context_age_in_gc' 78 return 'v8.detached_context_age_in_gc'
79 79
80 80
81 class _InfiniteScrollBenchmark(perf_benchmark.PerfBenchmark): 81 class _InfiniteScrollBenchmark(perf_benchmark.PerfBenchmark):
82 """ Base class for infinite scroll benchmarks. 82 """ Base class for infinite scroll benchmarks.
83 """ 83 """
84 84
85 def SetExtraBrowserOptions(self, options): 85 def SetExtraBrowserOptions(self, options):
86 options.AppendExtraBrowserArgs([ 86 options.AppendExtraBrowserArgs([
87 # TODO(perezju): Temporary workaround to disable periodic memory dumps.
88 # See: http://crbug.com/513692
89 '--enable-memory-benchmarking',
90 # Disable push notifications for Facebook. 87 # Disable push notifications for Facebook.
91 '--disable-notifications', 88 '--disable-notifications',
92 ]) 89 ])
93 v8_helper.AppendJSFlags(options, '--heap-growing-percent=10') 90 v8_helper.AppendJSFlags(options, '--heap-growing-percent=10')
94 91
95 def CreateTimelineBasedMeasurementOptions(self): 92 def CreateTimelineBasedMeasurementOptions(self):
96 v8_categories = [ 93 v8_categories = [
97 'blink.console', 'disabled-by-default-v8.gc', 94 'blink.console', 'disabled-by-default-v8.gc',
98 'renderer.scheduler', 'v8', 'webkit.console'] 95 'renderer.scheduler', 'v8', 'webkit.console']
99 smoothness_categories = [ 96 smoothness_categories = [
100 'webkit.console', 'blink.console', 'benchmark', 'trace_event_overhead'] 97 'webkit.console', 'blink.console', 'benchmark', 'trace_event_overhead']
101 memory_categories = ['blink.console', 'disabled-by-default-memory-infra'] 98 memory_categories = ['blink.console', 'disabled-by-default-memory-infra']
102 category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter( 99 category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter(
103 ','.join(['-*'] + v8_categories + 100 ','.join(['-*'] + v8_categories +
104 smoothness_categories + memory_categories)) 101 smoothness_categories + memory_categories))
105 options = timeline_based_measurement.Options(category_filter) 102 options = timeline_based_measurement.Options(category_filter)
106 # TODO(ulan): Add frame time discrepancy once it is ported to TBMv2, 103 # TODO(ulan): Add frame time discrepancy once it is ported to TBMv2,
107 # see crbug.com/606841. 104 # see crbug.com/606841.
108 options.SetTimelineBasedMetrics(['v8AndMemoryMetrics']) 105 options.SetTimelineBasedMetrics(['v8AndMemoryMetrics'])
106 # Setting an empty memory dump config disables periodic dumps.
107 options.config.chrome_trace_config.SetMemoryDumpConfig(
108 chrome_trace_config.MemoryDumpConfig())
109 return options 109 return options
110 110
111 @classmethod 111 @classmethod
112 def ValueCanBeAddedPredicate(cls, value, _): 112 def ValueCanBeAddedPredicate(cls, value, _):
113 return 'v8' in value.name 113 return 'v8' in value.name
114 114
115 @classmethod 115 @classmethod
116 def ShouldTearDownStateAfterEachStoryRun(cls): 116 def ShouldTearDownStateAfterEachStoryRun(cls):
117 return True 117 return True
118 118
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 return True 303 return True
304 # http://crbug.com/623576 304 # http://crbug.com/623576
305 if (possible_browser.platform.GetDeviceTypeName() == 'Nexus 5' or 305 if (possible_browser.platform.GetDeviceTypeName() == 'Nexus 5' or
306 possible_browser.platform.GetDeviceTypeName() == 'Nexus 7'): 306 possible_browser.platform.GetDeviceTypeName() == 'Nexus 7'):
307 return True 307 return True
308 return False 308 return False
309 309
310 @classmethod 310 @classmethod
311 def ShouldTearDownStateAfterEachStoryRun(cls): 311 def ShouldTearDownStateAfterEachStoryRun(cls):
312 return True 312 return True
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/system_health.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698