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

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

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