| OLD | NEW |
| 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 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 """ | 92 """ |
| 93 | 93 |
| 94 def SetExtraBrowserOptions(self, options): | 94 def SetExtraBrowserOptions(self, options): |
| 95 options.AppendExtraBrowserArgs([ | 95 options.AppendExtraBrowserArgs([ |
| 96 # Disable push notifications for Facebook. | 96 # Disable push notifications for Facebook. |
| 97 '--disable-notifications', | 97 '--disable-notifications', |
| 98 ]) | 98 ]) |
| 99 v8_helper.AppendJSFlags(options, '--heap-growing-percent=10') | 99 v8_helper.AppendJSFlags(options, '--heap-growing-percent=10') |
| 100 | 100 |
| 101 def CreateTimelineBasedMeasurementOptions(self): | 101 def CreateTimelineBasedMeasurementOptions(self): |
| 102 v8_categories = [ | 102 categories = [ |
| 103 'blink.console', 'disabled-by-default-v8.gc', | 103 # Disable all categories by default. |
| 104 'renderer.scheduler', 'v8', 'webkit.console'] | 104 '-*', |
| 105 smoothness_categories = [ | 105 # Memory categories. |
| 106 'webkit.console', 'blink.console', 'benchmark', 'trace_event_overhead'] | 106 'disabled-by-default-memory-infra', |
| 107 memory_categories = ['blink.console', 'disabled-by-default-memory-infra'] | 107 # EQT categories. |
| 108 'blink.user_timing', |
| 109 'loading', |
| 110 'navigation', |
| 111 'toplevel', |
| 112 # V8 categories. |
| 113 'blink.console', |
| 114 'disabled-by-default-v8.gc', |
| 115 'renderer.scheduler', |
| 116 'v8', |
| 117 'webkit.console' |
| 118 ] |
| 108 category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter( | 119 category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter( |
| 109 ','.join(['-*'] + v8_categories + | 120 ','.join(categories)) |
| 110 smoothness_categories + memory_categories)) | |
| 111 options = timeline_based_measurement.Options(category_filter) | 121 options = timeline_based_measurement.Options(category_filter) |
| 112 # TODO(ulan): Add frame time discrepancy once it is ported to TBMv2, | 122 # TODO(ulan): Add frame time discrepancy once it is ported to TBMv2, |
| 113 # see crbug.com/606841. | 123 # see crbug.com/606841. |
| 114 options.SetTimelineBasedMetrics(['v8AndMemoryMetrics']) | 124 options.SetTimelineBasedMetrics([ |
| 125 'expectedQueueingTimeMetric', 'v8AndMemoryMetrics']) |
| 115 # Setting an empty memory dump config disables periodic dumps. | 126 # Setting an empty memory dump config disables periodic dumps. |
| 116 options.config.chrome_trace_config.SetMemoryDumpConfig( | 127 options.config.chrome_trace_config.SetMemoryDumpConfig( |
| 117 chrome_trace_config.MemoryDumpConfig()) | 128 chrome_trace_config.MemoryDumpConfig()) |
| 118 return options | 129 return options |
| 119 | 130 |
| 120 @classmethod | 131 @classmethod |
| 121 def ValueCanBeAddedPredicate(cls, value, _): | 132 def ValueCanBeAddedPredicate(cls, value, _): |
| 122 return 'v8' in value.name | 133 return ('v8' in value.name) or ('eqt' in value.name) |
| 123 | 134 |
| 124 @classmethod | 135 @classmethod |
| 125 def ShouldTearDownStateAfterEachStoryRun(cls): | 136 def ShouldTearDownStateAfterEachStoryRun(cls): |
| 126 return True | 137 return True |
| 127 | 138 |
| 128 | 139 |
| 129 @benchmark.Owner(emails=['jochen@chromium.org']) | 140 @benchmark.Owner(emails=['jochen@chromium.org']) |
| 130 class V8TodoMVC(perf_benchmark.PerfBenchmark): | 141 class V8TodoMVC(perf_benchmark.PerfBenchmark): |
| 131 """Measures V8 Execution metrics on the TodoMVC examples.""" | 142 """Measures V8 Execution metrics on the TodoMVC examples.""" |
| 132 page_set = page_sets.TodoMVCPageSet | 143 page_set = page_sets.TodoMVCPageSet |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 Designed to represent a mix between top websites and a set of pages that | 371 Designed to represent a mix between top websites and a set of pages that |
| 361 have unique V8 characteristics. | 372 have unique V8 characteristics. |
| 362 """ | 373 """ |
| 363 | 374 |
| 364 @classmethod | 375 @classmethod |
| 365 def Name(cls): | 376 def Name(cls): |
| 366 return 'v8.runtime_stats.top_25' | 377 return 'v8.runtime_stats.top_25' |
| 367 | 378 |
| 368 def CreateStorySet(self, options): | 379 def CreateStorySet(self, options): |
| 369 return page_sets.V8Top25StorySet() | 380 return page_sets.V8Top25StorySet() |
| OLD | NEW |