Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
|
nednguyen
2016/11/10 23:04:11
nits: let merge this to v8.py file
fmeawad
2016/11/10 23:52:31
Done.
| |
| 5 from core import perf_benchmark | |
| 6 import page_sets | |
| 7 | |
| 8 from telemetry.timeline import chrome_trace_category_filter | |
| 9 from telemetry.web_perf import timeline_based_measurement | |
| 10 | |
| 11 | |
| 12 class _Top25RuntimeStats(perf_benchmark.PerfBenchmark): | |
| 13 options = {'pageset_repeat': 1} | |
| 14 tag = 'cold' | |
|
nednguyen
2016/11/10 23:04:11
what is this tag for?
fmeawad
2016/11/10 23:52:31
Not sure, probably copied from another benchmark,
| |
| 15 | |
| 16 def CreateTimelineBasedMeasurementOptions(self): | |
| 17 cat_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter( | |
| 18 filter_string='blink.console,navigation,blink.user_timing,loading') | |
| 19 | |
| 20 # Below categories are needed for first-meaningful-paint computation. | |
| 21 cat_filter.AddDisabledByDefault('disabled-by-default-blink.debug.layout') | |
| 22 cat_filter.AddIncludedCategory('devtools.timeline') | |
| 23 | |
| 24 # Below categories are needed for time-to-interactive computation. | |
| 25 cat_filter.AddIncludedCategory('toplevel') | |
| 26 | |
| 27 # V8 needed categories | |
| 28 cat_filter.AddIncludedCategory('v8') | |
| 29 cat_filter.AddDisabledByDefault('disabled-by-default-v8.runtime_stats') | |
| 30 | |
| 31 tbm_options = timeline_based_measurement.Options( | |
| 32 overhead_level=cat_filter) | |
| 33 tbm_options.SetTimelineBasedMetrics(['runtimeStatsMetric']) | |
| 34 return tbm_options | |
| 35 | |
| 36 @classmethod | |
| 37 def ShouldDisable(cls, possible_browser): | |
| 38 if possible_browser.browser_type == 'reference': | |
| 39 return True | |
| 40 return False | |
| 41 | |
| 42 @classmethod | |
| 43 def ShouldTearDownStateAfterEachStoryRun(cls): | |
| 44 return True | |
| 45 | |
| 46 | |
| 47 class V8Top25RuntimeStats(_Top25RuntimeStats): | |
| 48 """Runtime Stats benchmark for a 25 top V8 web pages. | |
| 49 | |
| 50 Designed to represent a mix between top websites and a set of pages that | |
| 51 have unique V8 characteristics. | |
| 52 """ | |
| 53 | |
| 54 @classmethod | |
| 55 def Name(cls): | |
| 56 return 'v8.runtime_stats.top_25' | |
| 57 | |
| 58 def CreateStorySet(self, options): | |
| 59 return page_sets.V8Top25StorySet() | |
| OLD | NEW |