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): | |
| 17 """Timeline based benchmark for the WebRtc rendering.""" | |
| 18 | |
| 19 page_set = page_sets.WebrtcRenderingMeasurementPageSet | |
| 20 | |
| 21 def CreateTimelineBasedMeasurementOptions(self): | |
| 22 cc_filter = tracing_category_filter.TracingCategoryFilter( | |
| 23 filter_string='cc') | |
|
nednguyen
2015/09/14 21:42:32
The bug here is that the filter string is too narr
| |
| 24 return timeline_based_measurement.Options(overhead_level=cc_filter) | |
| 25 | |
| 26 def CustomizeBrowserOptions(self, options): | |
| 27 import logging | |
| 28 logging.info('About to start web browser') | |
| 29 options.AppendExtraBrowserArgs('--use-fake-device-for-media-stream') | |
| 30 options.AppendExtraBrowserArgs('--use-fake-ui-for-media-stream') | |
| 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 print "value: %s" % value | |
| 39 return bool(RE_BENCHMARK_VALUES.match(value.name)) | |
| OLD | NEW |