Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 from core import perf_benchmark | 5 from core import perf_benchmark |
| 6 | 6 |
| 7 from measurements import webrtc | 7 from measurements import webrtc |
| 8 import page_sets | 8 import page_sets |
| 9 from telemetry import benchmark | 9 from telemetry import benchmark |
| 10 from telemetry.timeline import chrome_trace_category_filter | 10 from telemetry.timeline import chrome_trace_category_filter |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 84 [webrtc_rendering_timeline.WebRtcRenderingTimelineMetric()]) | 84 [webrtc_rendering_timeline.WebRtcRenderingTimelineMetric()]) |
| 85 return options | 85 return options |
| 86 | 86 |
| 87 def SetExtraBrowserOptions(self, options): | 87 def SetExtraBrowserOptions(self, options): |
| 88 options.AppendExtraBrowserArgs('--use-fake-device-for-media-stream') | 88 options.AppendExtraBrowserArgs('--use-fake-device-for-media-stream') |
| 89 options.AppendExtraBrowserArgs('--use-fake-ui-for-media-stream') | 89 options.AppendExtraBrowserArgs('--use-fake-ui-for-media-stream') |
| 90 | 90 |
| 91 @classmethod | 91 @classmethod |
| 92 def Name(cls): | 92 def Name(cls): |
| 93 return 'webrtc.webrtc_smoothness' | 93 return 'webrtc.webrtc_smoothness' |
| 94 | |
| 95 | |
| 96 # WebrtcRenderingTBMv2 must be a PerfBenchmark, and not a _Webrtc, because it is | |
| 97 # a timeline-based metric. | |
| 98 class WebrtcRenderingTBMv2(perf_benchmark.PerfBenchmark): | |
| 99 """Specific time measurements (e.g. fps, smoothness) for WebRtc rendering.""" | |
| 100 | |
| 101 page_set = page_sets.WebrtcRenderingPageSet | |
| 102 | |
| 103 def CreateTimelineBasedMeasurementOptions(self): | |
| 104 category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter( | |
| 105 filter_string='webrtc,webkit.console,blink.console') | |
|
nednguyen
2017/03/14 19:33:01
filter_string='webrtc,webkit.console,toplevel'
| |
| 106 options = timeline_based_measurement.Options(category_filter) | |
| 107 options.SetTimelineBasedMetrics(['webrtcRenderingMetric']) | |
|
nednguyen
2017/03/14 19:33:01
options.SetTimelineBasedMetrics(['webrtcRenderingM
| |
| 108 return options | |
| 109 | |
| 110 def SetExtraBrowserOptions(self, options): | |
| 111 options.AppendExtraBrowserArgs('--use-fake-device-for-media-stream') | |
| 112 options.AppendExtraBrowserArgs('--use-fake-ui-for-media-stream') | |
| 113 | |
| 114 @classmethod | |
| 115 def Name(cls): | |
| 116 return 'webrtc.webrtc_smoothness_tbmv2' | |
| OLD | NEW |