Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: tools/perf/benchmarks/webrtc.py

Issue 2463013003: Add a new telemetry benchmark to stress-test WebRTC. (Closed)
Patch Set: Upload webrtc_stresstest_cases to cloud storage. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/perf/measurements/webrtc.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 class WebrtcDataChannel(_Webrtc): 44 class WebrtcDataChannel(_Webrtc):
45 """Measures WebRtc DataChannel loopback.""" 45 """Measures WebRtc DataChannel loopback."""
46 page_set = page_sets.WebrtcDatachannelPageSet 46 page_set = page_sets.WebrtcDatachannelPageSet
47 47
48 @classmethod 48 @classmethod
49 def Name(cls): 49 def Name(cls):
50 return 'webrtc.datachannel' 50 return 'webrtc.datachannel'
51 51
52 52
53 class WebrtcStressTest(perf_benchmark.PerfBenchmark):
54 """Measures WebRtc CPU and GPU usage with multiple peer connections."""
55 page_set = page_sets.WebrtcStresstestPageSet
56
57 @classmethod
58 def Name(cls):
59 return 'webrtc.stress'
60
61 def CreatePageTest(self, options):
62 return webrtc.WebRTC(use_webrtc_stats=False)
63
64
53 # WebrtcRendering must be a PerfBenchmark, and not a _Webrtc, because it is a 65 # WebrtcRendering must be a PerfBenchmark, and not a _Webrtc, because it is a
54 # timeline-based. 66 # timeline-based.
55 # Disabled on reference builds because they crash and don't support tab 67 # Disabled on reference builds because they crash and don't support tab
56 # capture. See http://crbug.com/603232. 68 # capture. See http://crbug.com/603232.
57 @benchmark.Disabled('reference') 69 @benchmark.Disabled('reference')
58 @benchmark.Disabled('android') # http://crbug.com/610019 70 @benchmark.Disabled('android') # http://crbug.com/610019
59 class WebrtcRendering(perf_benchmark.PerfBenchmark): 71 class WebrtcRendering(perf_benchmark.PerfBenchmark):
60 """Specific time measurements (e.g. fps, smoothness) for WebRtc rendering.""" 72 """Specific time measurements (e.g. fps, smoothness) for WebRtc rendering."""
61 73
62 page_set = page_sets.WebrtcRenderingPageSet 74 page_set = page_sets.WebrtcRenderingPageSet
63 75
64 def CreateTimelineBasedMeasurementOptions(self): 76 def CreateTimelineBasedMeasurementOptions(self):
65 category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter( 77 category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter(
66 filter_string='webrtc,webkit.console,blink.console') 78 filter_string='webrtc,webkit.console,blink.console')
67 options = timeline_based_measurement.Options(category_filter) 79 options = timeline_based_measurement.Options(category_filter)
68 options.SetLegacyTimelineBasedMetrics( 80 options.SetLegacyTimelineBasedMetrics(
69 [webrtc_rendering_timeline.WebRtcRenderingTimelineMetric()]) 81 [webrtc_rendering_timeline.WebRtcRenderingTimelineMetric()])
70 return options 82 return options
71 83
72 def SetExtraBrowserOptions(self, options): 84 def SetExtraBrowserOptions(self, options):
73 options.AppendExtraBrowserArgs('--use-fake-device-for-media-stream') 85 options.AppendExtraBrowserArgs('--use-fake-device-for-media-stream')
74 options.AppendExtraBrowserArgs('--use-fake-ui-for-media-stream') 86 options.AppendExtraBrowserArgs('--use-fake-ui-for-media-stream')
75 87
76 @classmethod 88 @classmethod
77 def Name(cls): 89 def Name(cls):
78 return 'webrtc.webrtc_smoothness' 90 return 'webrtc.webrtc_smoothness'
OLDNEW
« no previous file with comments | « no previous file | tools/perf/measurements/webrtc.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698