Chromium Code Reviews| 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 | |
| 6 import re | |
| 7 | |
| 8 from core import perf_benchmark | |
| 9 from telemetry.timeline import tracing_category_filter | |
| 10 from telemetry.web_perf import timeline_based_measurement | |
| 11 | |
| 12 import page_sets | |
| 13 | |
| 14 RE_BENCHMARK_VALUES = re.compile('WebRTCRendering_') | |
| 15 | |
| 16 | |
| 17 class WebRTCRendering(perf_benchmark.PerfBenchmark): | |
| 18 """Timeline based benchmark for the WebRtc rendering.""" | |
| 19 | |
| 20 page_set = page_sets.WebrtcRenderingPageSet | |
| 21 | |
| 22 def CreateTimelineBasedMeasurementOptions(self): | |
| 23 cc_filter = tracing_category_filter.TracingCategoryFilter( | |
| 24 filter_string='webrtc, webkit.console, blink.console') | |
| 25 return timeline_based_measurement.Options(overhead_level=cc_filter) | |
| 26 | |
| 27 def CustomizeBrowserOptions(self, options): | |
| 28 options.AppendExtraBrowserArgs('--use-fake-device-for-media-stream') | |
| 29 options.AppendExtraBrowserArgs('--use-fake-ui-for-media-stream') | |
| 30 options.AppendExtraBrowserArgs('--enable-rtc-smoothness-algorithm') | |
| 31 | |
| 32 @classmethod | |
| 33 def Name(cls): | |
| 34 return 'webrtc_rendering.webrtc_rendering' | |
| 35 | |
| 36 @classmethod | |
| 37 def ValueCanBeAddedPredicate(cls, value, is_first_result): | |
| 38 return bool(RE_BENCHMARK_VALUES.match(value.name)) | |
|
eakuefner
2015/09/28 19:49:48
It seems like there is no need to use regular expr
cpaulin (no longer in chrome)
2015/09/29 15:50:24
Done.
| |
| OLD | NEW |