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 import re | 5 import re |
| 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 chrome_trace_config | 18 from telemetry.timeline import chrome_trace_config |
| 19 from telemetry.timeline import chrome_trace_category_filter | 19 from telemetry.timeline import chrome_trace_category_filter |
| 20 from telemetry.web_perf import timeline_based_measurement | 20 from telemetry.web_perf import timeline_based_measurement |
| 21 | 21 |
| 22 | 22 |
| 23 def CreateV8TimelineBasedMeasurementOptions(): | 23 def CreateV8TimelineBasedMeasurementOptions(): |
| 24 category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter() | 24 category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter() |
| 25 category_filter.AddIncludedCategory('v8') | 25 category_filter.AddIncludedCategory('v8') |
| 26 category_filter.AddIncludedCategory('blink') | |
|
Sami
2016/08/24 16:40:16
Did you mean to add toplevel too? We could also tr
| |
| 26 category_filter.AddIncludedCategory('blink.console') | 27 category_filter.AddIncludedCategory('blink.console') |
| 27 category_filter.AddDisabledByDefault('disabled-by-default-v8.compile') | 28 category_filter.AddDisabledByDefault('disabled-by-default-v8.compile') |
| 28 options = timeline_based_measurement.Options(category_filter) | 29 options = timeline_based_measurement.Options(category_filter) |
| 29 options.SetTimelineBasedMetrics(['executionMetric']) | 30 options.SetTimelineBasedMetrics(['executionMetric']) |
| 30 return options | 31 return options |
| 31 | 32 |
| 32 | 33 |
| 33 @benchmark.Disabled('win') # crbug.com/416502 | 34 @benchmark.Disabled('win') # crbug.com/416502 |
| 34 class V8Top25(perf_benchmark.PerfBenchmark): | 35 class V8Top25(perf_benchmark.PerfBenchmark): |
| 35 """Measures V8 GC metrics on the while scrolling down the top 25 web pages. | 36 """Measures V8 GC metrics on the while scrolling down the top 25 web pages. |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 313 return True | 314 return True |
| 314 # http://crbug.com/623576 | 315 # http://crbug.com/623576 |
| 315 if (possible_browser.platform.GetDeviceTypeName() == 'Nexus 5' or | 316 if (possible_browser.platform.GetDeviceTypeName() == 'Nexus 5' or |
| 316 possible_browser.platform.GetDeviceTypeName() == 'Nexus 7'): | 317 possible_browser.platform.GetDeviceTypeName() == 'Nexus 7'): |
| 317 return True | 318 return True |
| 318 return False | 319 return False |
| 319 | 320 |
| 320 @classmethod | 321 @classmethod |
| 321 def ShouldTearDownStateAfterEachStoryRun(cls): | 322 def ShouldTearDownStateAfterEachStoryRun(cls): |
| 322 return True | 323 return True |
| OLD | NEW |