| 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 | 4 |
| 5 import page_sets | 5 import page_sets |
| 6 | 6 |
| 7 from core import perf_benchmark | 7 from core import perf_benchmark |
| 8 from telemetry import benchmark | 8 from telemetry import benchmark |
| 9 from telemetry.page import legacy_page_test | 9 from telemetry.page import legacy_page_test |
| 10 from telemetry.value import scalar | 10 from telemetry.value import scalar |
| 11 from telemetry.value import improvement_direction | 11 from telemetry.value import improvement_direction |
| 12 from telemetry.timeline import chrome_trace_category_filter | 12 from telemetry.timeline import chrome_trace_category_filter |
| 13 from telemetry.timeline import chrome_trace_config | |
| 14 from telemetry.web_perf import timeline_based_measurement | 13 from telemetry.web_perf import timeline_based_measurement |
| 15 from telemetry.web_perf.metrics import v8_gc_latency | 14 from telemetry.web_perf.metrics import v8_gc_latency |
| 16 from telemetry.web_perf.metrics import smoothness | 15 from telemetry.web_perf.metrics import smoothness |
| 17 from telemetry.web_perf.metrics import memory_timeline | 16 from telemetry.web_perf.metrics import memory_timeline |
| 18 | 17 |
| 19 | 18 |
| 20 class _OortOnlineMeasurement(legacy_page_test.LegacyPageTest): | 19 class _OortOnlineMeasurement(legacy_page_test.LegacyPageTest): |
| 21 | 20 |
| 22 def __init__(self): | 21 def __init__(self): |
| 23 super(_OortOnlineMeasurement, self).__init__() | 22 super(_OortOnlineMeasurement, self).__init__() |
| (...skipping 29 matching lines...) Expand all Loading... |
| 53 # Disabled on reference builds because they don't support the new | 52 # Disabled on reference builds because they don't support the new |
| 54 # Tracing.requestMemoryDump DevTools API. See http://crbug.com/540022. | 53 # Tracing.requestMemoryDump DevTools API. See http://crbug.com/540022. |
| 55 @benchmark.Disabled('reference') | 54 @benchmark.Disabled('reference') |
| 56 @benchmark.Disabled('android') | 55 @benchmark.Disabled('android') |
| 57 class OortOnlineTBM(perf_benchmark.PerfBenchmark): | 56 class OortOnlineTBM(perf_benchmark.PerfBenchmark): |
| 58 """OortOnline benchmark that measures WebGL and V8 performance. | 57 """OortOnline benchmark that measures WebGL and V8 performance. |
| 59 URL: http://oortonline.gl/#run | 58 URL: http://oortonline.gl/#run |
| 60 Info: http://v8project.blogspot.de/2015/10/jank-busters-part-one.html | 59 Info: http://v8project.blogspot.de/2015/10/jank-busters-part-one.html |
| 61 """ | 60 """ |
| 62 | 61 |
| 62 def SetExtraBrowserOptions(self, options): |
| 63 options.AppendExtraBrowserArgs([ |
| 64 # TODO(perezju): Temporary workaround to disable periodic memory dumps. |
| 65 # See: http://crbug.com/513692 |
| 66 '--enable-memory-benchmarking', |
| 67 ]) |
| 68 |
| 63 def CreateStorySet(self, options): | 69 def CreateStorySet(self, options): |
| 64 return page_sets.OortOnlineTBMPageSet() | 70 return page_sets.OortOnlineTBMPageSet() |
| 65 | 71 |
| 66 def CreateTimelineBasedMeasurementOptions(self): | 72 def CreateTimelineBasedMeasurementOptions(self): |
| 67 v8_gc_latency_categories = [ | 73 v8_gc_latency_categories = [ |
| 68 'blink.console', 'renderer.scheduler', 'v8', 'webkit.console'] | 74 'blink.console', 'renderer.scheduler', 'v8', 'webkit.console'] |
| 69 smoothness_categories = [ | 75 smoothness_categories = [ |
| 70 'webkit.console', 'blink.console', 'benchmark', 'trace_event_overhead'] | 76 'webkit.console', 'blink.console', 'benchmark', 'trace_event_overhead'] |
| 71 categories = list(set(v8_gc_latency_categories + smoothness_categories)) | 77 categories = list(set(v8_gc_latency_categories + smoothness_categories)) |
| 72 memory_categories = 'blink.console,disabled-by-default-memory-infra' | 78 memory_categories = 'blink.console,disabled-by-default-memory-infra' |
| 73 category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter( | 79 category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter( |
| 74 memory_categories) | 80 memory_categories) |
| 75 for category in categories: | 81 for category in categories: |
| 76 category_filter.AddIncludedCategory(category) | 82 category_filter.AddIncludedCategory(category) |
| 77 options = timeline_based_measurement.Options(category_filter) | 83 options = timeline_based_measurement.Options(category_filter) |
| 78 options.SetLegacyTimelineBasedMetrics([v8_gc_latency.V8GCLatency(), | 84 options.SetLegacyTimelineBasedMetrics([v8_gc_latency.V8GCLatency(), |
| 79 smoothness.SmoothnessMetric(), | 85 smoothness.SmoothnessMetric(), |
| 80 memory_timeline.MemoryTimelineMetric()]) | 86 memory_timeline.MemoryTimelineMetric()]) |
| 81 # Setting an empty memory dump config disables periodic dumps. | |
| 82 options.config.chrome_trace_config.SetMemoryDumpConfig( | |
| 83 chrome_trace_config.MemoryDumpConfig()) | |
| 84 return options | 87 return options |
| 85 | 88 |
| 86 @classmethod | 89 @classmethod |
| 87 def Name(cls): | 90 def Name(cls): |
| 88 return 'oortonline_tbm' | 91 return 'oortonline_tbm' |
| 89 | 92 |
| 90 @classmethod | 93 @classmethod |
| 91 def ValueCanBeAddedPredicate(cls, value, is_first_result): | 94 def ValueCanBeAddedPredicate(cls, value, is_first_result): |
| 92 if value.tir_label in ['Begin', 'End']: | 95 if value.tir_label in ['Begin', 'End']: |
| 93 return value.name.startswith('memory_') and 'v8_renderer' in value.name | 96 return value.name.startswith('memory_') and 'v8_renderer' in value.name |
| 94 else: | 97 else: |
| 95 return value.tir_label == 'Running' | 98 return value.tir_label == 'Running' |
| OLD | NEW |