Chromium Code Reviews| 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 221 return True | 221 return True |
| 222 # http://crbug.com/623576 | 222 # http://crbug.com/623576 |
| 223 if (possible_browser.platform.GetDeviceTypeName() == 'Nexus 5' or | 223 if (possible_browser.platform.GetDeviceTypeName() == 'Nexus 5' or |
| 224 possible_browser.platform.GetDeviceTypeName() == 'Nexus 7'): | 224 possible_browser.platform.GetDeviceTypeName() == 'Nexus 7'): |
| 225 return True | 225 return True |
| 226 return False | 226 return False |
| 227 | 227 |
| 228 @classmethod | 228 @classmethod |
| 229 def ShouldTearDownStateAfterEachStoryRun(cls): | 229 def ShouldTearDownStateAfterEachStoryRun(cls): |
| 230 return True | 230 return True |
| 231 | |
| 232 | |
| 233 class _Top25RuntimeStats(perf_benchmark.PerfBenchmark): | |
| 234 options = {'pageset_repeat': 1} | |
| 235 | |
| 236 def CreateTimelineBasedMeasurementOptions(self): | |
| 237 cat_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter( | |
| 238 filter_string='blink.console,navigation,blink.user_timing,loading') | |
| 239 | |
| 240 # Below categories are needed for first-meaningful-paint computation. | |
|
nednguyen
2016/11/11 00:06:09
You no longer need these two for FMP. Maybe just r
fmeawad
2016/11/11 01:06:08
Copied the loadingMetric version, and added a TODO
| |
| 241 cat_filter.AddDisabledByDefault('disabled-by-default-blink.debug.layout') | |
| 242 cat_filter.AddIncludedCategory('devtools.timeline') | |
| 243 | |
| 244 # Below categories are needed for time-to-interactive computation. | |
| 245 cat_filter.AddIncludedCategory('toplevel') | |
| 246 | |
| 247 # V8 needed categories | |
| 248 cat_filter.AddIncludedCategory('v8') | |
| 249 cat_filter.AddDisabledByDefault('disabled-by-default-v8.runtime_stats') | |
| 250 | |
| 251 tbm_options = timeline_based_measurement.Options( | |
| 252 overhead_level=cat_filter) | |
| 253 tbm_options.SetTimelineBasedMetrics(['runtimeStatsMetric']) | |
| 254 return tbm_options | |
| 255 | |
| 256 @classmethod | |
| 257 def ShouldDisable(cls, possible_browser): | |
| 258 if possible_browser.browser_type == 'reference': | |
| 259 return True | |
| 260 return False | |
| 261 | |
| 262 @classmethod | |
| 263 def ShouldTearDownStateAfterEachStoryRun(cls): | |
|
nednguyen
2016/11/11 00:06:09
You don't need to override this since it's True by
fmeawad
2016/11/11 01:06:09
Done.
| |
| 264 return True | |
| 265 | |
| 266 | |
| 267 class V8Top25RuntimeStats(_Top25RuntimeStats): | |
| 268 """Runtime Stats benchmark for a 25 top V8 web pages. | |
| 269 | |
| 270 Designed to represent a mix between top websites and a set of pages that | |
| 271 have unique V8 characteristics. | |
| 272 """ | |
| 273 | |
| 274 @classmethod | |
| 275 def Name(cls): | |
| 276 return 'v8.runtime_stats.top_25' | |
| 277 | |
| 278 def CreateStorySet(self, options): | |
| 279 return page_sets.V8Top25StorySet() | |
| OLD | NEW |