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

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

Issue 1924523002: Upgrade v8.infinite_scroll and v8.mobile_infinite_scroll to TBMv2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove disabled-by-default-v8 Created 4 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
« no previous file with comments | « no previous file | 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 shlex 5 import shlex
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 tracing_category_filter 18 from telemetry.timeline import tracing_category_filter
19 from telemetry.web_perf import timeline_based_measurement 19 from telemetry.web_perf import timeline_based_measurement
20 from telemetry.web_perf.metrics import v8_gc_latency
21 from telemetry.web_perf.metrics import v8_execution
22 from telemetry.web_perf.metrics import smoothness
23 from telemetry.web_perf.metrics import memory_timeline
24 20
25 21
26 def CreateV8TimelineBasedMeasurementOptions(): 22 def CreateV8TimelineBasedMeasurementOptions():
27 category_filter = tracing_category_filter.CreateMinimalOverheadFilter() 23 category_filter = tracing_category_filter.CreateMinimalOverheadFilter()
28 category_filter.AddIncludedCategory('v8') 24 category_filter.AddIncludedCategory('v8')
29 category_filter.AddIncludedCategory('blink.console') 25 category_filter.AddIncludedCategory('blink.console')
30 options = timeline_based_measurement.Options(category_filter) 26 options = timeline_based_measurement.Options(category_filter)
31 options.SetTimelineBasedMetric('executionMetric') 27 options.SetTimelineBasedMetric('executionMetric')
32 return options 28 return options
33 29
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 # previous flags as well. 95 # previous flags as well.
100 '--js-flags=--heap-growing-percent=10 %s' % 96 '--js-flags=--heap-growing-percent=10 %s' %
101 (' '.join(existing_js_flags)) 97 (' '.join(existing_js_flags))
102 ]) 98 ])
103 99
104 def CreateTimelineBasedMeasurementOptions(self): 100 def CreateTimelineBasedMeasurementOptions(self):
105 v8_categories = [ 101 v8_categories = [
106 'blink.console', 'renderer.scheduler', 'v8', 'webkit.console'] 102 'blink.console', 'renderer.scheduler', 'v8', 'webkit.console']
107 smoothness_categories = [ 103 smoothness_categories = [
108 'webkit.console', 'blink.console', 'benchmark', 'trace_event_overhead'] 104 'webkit.console', 'blink.console', 'benchmark', 'trace_event_overhead']
109 categories = list(set(v8_categories + smoothness_categories)) 105 memory_categories = ['blink.console', 'disabled-by-default-memory-infra']
110 memory_categories = 'blink.console,disabled-by-default-memory-infra'
111 category_filter = tracing_category_filter.TracingCategoryFilter( 106 category_filter = tracing_category_filter.TracingCategoryFilter(
112 memory_categories) 107 ','.join(['-*'] + v8_categories +
113 for category in categories: 108 smoothness_categories + memory_categories))
114 category_filter.AddIncludedCategory(category)
115 options = timeline_based_measurement.Options(category_filter) 109 options = timeline_based_measurement.Options(category_filter)
116 options.SetLegacyTimelineBasedMetrics([v8_gc_latency.V8GCLatency(), 110 # TODO(ulan): Add frame time discrepancy once it is ported to TBMv2,
117 v8_execution.V8ExecutionMetric(), 111 # see crbug.com/606841.
118 smoothness.SmoothnessMetric(), 112 options.SetTimelineBasedMetric('v8AndMemoryMetrics')
119 memory_timeline.MemoryTimelineMetric()])
120 return options 113 return options
121 114
122 @classmethod 115 @classmethod
123 def ValueCanBeAddedPredicate(cls, value, _): 116 def ValueCanBeAddedPredicate(cls, value, _):
124 if value.tir_label in ['Load', 'Wait']: 117 return 'v8' in value.name
125 return (value.name.startswith('v8_') and not
126 value.name.startswith('v8_gc'))
127 if value.tir_label in ['Begin', 'End']:
128 return (value.name.startswith('memory_') and
129 'v8_renderer' in value.name) or \
130 (value.name.startswith('v8_') and not
131 value.name.startswith('v8_gc'))
132 else:
133 return value.tir_label == 'Scrolling'
134 118
135 @classmethod 119 @classmethod
136 def ShouldTearDownStateAfterEachStoryRun(cls): 120 def ShouldTearDownStateAfterEachStoryRun(cls):
137 return True 121 return True
138 122
139 123
140 class V8TodoMVC(perf_benchmark.PerfBenchmark): 124 class V8TodoMVC(perf_benchmark.PerfBenchmark):
141 """Measures V8 Execution metrics on the TodoMVC examples.""" 125 """Measures V8 Execution metrics on the TodoMVC examples."""
142 page_set = page_sets.TodoMVCPageSet 126 page_set = page_sets.TodoMVCPageSet
143 127
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 def Name(cls): 222 def Name(cls):
239 return 'v8.google' 223 return 'v8.google'
240 224
241 @classmethod 225 @classmethod
242 def ShouldDisable(cls, possible_browser): 226 def ShouldDisable(cls, possible_browser):
243 return cls.IsSvelte(possible_browser) # http://crbug.com/596556 227 return cls.IsSvelte(possible_browser) # http://crbug.com/596556
244 228
245 @classmethod 229 @classmethod
246 def ShouldTearDownStateAfterEachStoryRun(cls): 230 def ShouldTearDownStateAfterEachStoryRun(cls):
247 return True 231 return True
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698