Chromium Code Reviews| Index: tools/perf/benchmarks/webrtc_rendering.py |
| diff --git a/tools/perf/benchmarks/webrtc_rendering.py b/tools/perf/benchmarks/webrtc_rendering.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a1cf09242da06c53cb8140496fd8223989b907fb |
| --- /dev/null |
| +++ b/tools/perf/benchmarks/webrtc_rendering.py |
| @@ -0,0 +1,37 @@ |
| +# Copyright 2015 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| + |
| +import re |
| + |
| +from core import perf_benchmark |
| +from telemetry.timeline import tracing_category_filter |
| +from telemetry.web_perf import timeline_based_measurement |
| + |
| +import page_sets |
| + |
| +RE_BENCHMARK_VALUES = re.compile('WebRTCRendering_') |
| + |
| +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.
|
| + """Timeline based benchmark for the WebRtc rendering.""" |
| + |
| + page_set = page_sets.WebrtcRenderingPageSet |
| + |
| + def CreateTimelineBasedMeasurementOptions(self): |
| + cc_filter = tracing_category_filter.TracingCategoryFilter( |
| + 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.
|
| + return timeline_based_measurement.Options(overhead_level=cc_filter) |
| + |
| + def CustomizeBrowserOptions(self, options): |
| + options.AppendExtraBrowserArgs('--use-fake-device-for-media-stream') |
| + options.AppendExtraBrowserArgs('--use-fake-ui-for-media-stream') |
| + options.AppendExtraBrowserArgs('--enable-rtc-smoothness-algorithm') |
| + |
| + @classmethod |
| + def Name(cls): |
| + return 'webrtc_rendering.webrtc_rendering' |
| + |
| + @classmethod |
| + def ValueCanBeAddedPredicate(cls, value, is_first_result): |
| + return bool(RE_BENCHMARK_VALUES.match(value.name)) |