| OLD | NEW |
| (Empty) |
| 1 # Copyright 2015 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 | |
| 5 from core import perf_benchmark | |
| 6 from telemetry.timeline import tracing_category_filter | |
| 7 from telemetry.web_perf import timeline_based_measurement | |
| 8 | |
| 9 import page_sets | |
| 10 | |
| 11 BENCHMARK_VALUES = 'WebRTCRendering_' | |
| 12 | |
| 13 class WebRTCRendering(perf_benchmark.PerfBenchmark): | |
| 14 """Timeline based benchmark for the WebRtc rendering.""" | |
| 15 | |
| 16 page_set = page_sets.WebrtcRenderingPageSet | |
| 17 | |
| 18 def CreateTimelineBasedMeasurementOptions(self): | |
| 19 cc_filter = tracing_category_filter.TracingCategoryFilter( | |
| 20 filter_string='webrtc,webkit.console,blink.console') | |
| 21 return timeline_based_measurement.Options(overhead_level=cc_filter) | |
| 22 | |
| 23 def SetExtraBrowserOptions(self, options): | |
| 24 options.AppendExtraBrowserArgs('--use-fake-device-for-media-stream') | |
| 25 options.AppendExtraBrowserArgs('--use-fake-ui-for-media-stream') | |
| 26 | |
| 27 @classmethod | |
| 28 def Name(cls): | |
| 29 return 'webrtc_rendering.webrtc_rendering' | |
| 30 | |
| 31 @classmethod | |
| 32 def ValueCanBeAddedPredicate(cls, value, is_first_result): | |
| 33 return value.name.startswith(BENCHMARK_VALUES) | |
| OLD | NEW |