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 class WebRTCRendering(perf_benchmark.PerfBenchmark): | |
|
phoglund_chromium
2015/09/17 11:23:58
Nit: always two blank line before top-level class
cpaulin (no longer in chrome)
2015/09/17 23:58:54
Done.
| |
| 17 """Timeline based benchmark for the WebRtc rendering.""" | |
| 18 | |
| 19 page_set = page_sets.WebrtcRenderingPageSet | |
| 20 | |
| 21 def CreateTimelineBasedMeasurementOptions(self): | |
| 22 cc_filter = tracing_category_filter.TracingCategoryFilter( | |
| 23 filter_string='webrtc, webkit.console, blink.console') | |
|
phoglund_chromium
2015/09/17 11:23:58
Nit: indent 4 on line break
cpaulin (no longer in chrome)
2015/09/17 23:58:54
Done.
| |
| 24 return timeline_based_measurement.Options(overhead_level=cc_filter) | |
| 25 | |
| 26 def CustomizeBrowserOptions(self, options): | |
| 27 options.AppendExtraBrowserArgs('--use-fake-device-for-media-stream') | |
| 28 options.AppendExtraBrowserArgs('--use-fake-ui-for-media-stream') | |
| 29 options.AppendExtraBrowserArgs('--enable-rtc-smoothness-algorithm') | |
| 30 | |
| 31 @classmethod | |
| 32 def Name(cls): | |
| 33 return 'webrtc_rendering.webrtc_rendering' | |
| 34 | |
| 35 @classmethod | |
| 36 def ValueCanBeAddedPredicate(cls, value, is_first_result): | |
| 37 return bool(RE_BENCHMARK_VALUES.match(value.name)) | |
| OLD | NEW |