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

Side by Side Diff: tools/perf/page_sets/webrtc_cases.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 | « tools/perf/page_sets/data/webrtc_stresstest_cases_000.wpr.sha1 ('k') | no next file » | 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 import os 4 import os
5 5
6 from telemetry import story 6 from telemetry import story
7 from telemetry.page import page as page_module 7 from telemetry.page import page as page_module
8 8
9 9
10 WEBRTC_TEST_PAGES_URL = 'https://test.webrtc.org/manual/'
10 WEBRTC_GITHUB_SAMPLES_URL = 'https://webrtc.github.io/samples/src/content/' 11 WEBRTC_GITHUB_SAMPLES_URL = 'https://webrtc.github.io/samples/src/content/'
11 MEDIARECORDER_GITHUB_URL = 'https://rawgit.com/cricdecyan/mediarecorder/master/' 12 MEDIARECORDER_GITHUB_URL = 'https://rawgit.com/cricdecyan/mediarecorder/master/'
12 13
13 14
14 class WebrtcPage(page_module.Page): 15 class WebrtcPage(page_module.Page):
15 16
16 def __init__(self, url, page_set, name): 17 def __init__(self, url, page_set, name):
17 super(WebrtcPage, self).__init__( 18 super(WebrtcPage, self).__init__(
18 url=url, page_set=page_set, name=name) 19 url=url, page_set=page_set, name=name)
19 20
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 page_set=page_set) 147 page_set=page_set)
147 148
148 def RunPageInteractions(self, action_runner): 149 def RunPageInteractions(self, action_runner):
149 with action_runner.CreateInteraction('Action_Canvas_PeerConnection', 150 with action_runner.CreateInteraction('Action_Canvas_PeerConnection',
150 repeatable=False): 151 repeatable=False):
151 action_runner.ExecuteJavaScript('draw();') 152 action_runner.ExecuteJavaScript('draw();')
152 action_runner.ExecuteJavaScript('doCanvasCaptureAndPeerConnection();') 153 action_runner.ExecuteJavaScript('doCanvasCaptureAndPeerConnection();')
153 action_runner.Wait(10) 154 action_runner.Wait(10)
154 155
155 156
157 class Page9(WebrtcPage):
158 """Why: Sets up several peerconnections in the same page."""
159
160 def __init__(self, page_set):
161 super(Page9, self).__init__(
162 url= WEBRTC_TEST_PAGES_URL + 'multiple-peerconnections/',
163 name='multiple_peerconnections',
164 page_set=page_set)
165
166 def RunPageInteractions(self, action_runner):
167 with action_runner.CreateInteraction('Action_Create_PeerConnection',
168 repeatable=False):
169 # Set the number of peer connections to create to 15.
170 action_runner.ExecuteJavaScript(
171 'document.getElementById("peer-connections-input").value=15')
172 action_runner.ClickElement('button[id="start-test-button"]')
173 action_runner.Wait(45)
174
175
156 class WebrtcGetusermediaPageSet(story.StorySet): 176 class WebrtcGetusermediaPageSet(story.StorySet):
157 """WebRTC tests for local getUserMedia: video capture and playback.""" 177 """WebRTC tests for local getUserMedia: video capture and playback."""
158 178
159 def __init__(self): 179 def __init__(self):
160 super(WebrtcGetusermediaPageSet, self).__init__( 180 super(WebrtcGetusermediaPageSet, self).__init__(
161 archive_data_file='data/webrtc_getusermedia_cases.json', 181 archive_data_file='data/webrtc_getusermedia_cases.json',
162 cloud_storage_bucket=story.PUBLIC_BUCKET) 182 cloud_storage_bucket=story.PUBLIC_BUCKET)
163 183
164 self.AddStory(Page1(self)) 184 self.AddStory(Page1(self))
165 185
166 186
187 class WebrtcStresstestPageSet(story.StorySet):
188 """WebRTC stress-testing with multiple peer connections."""
189
190 def __init__(self):
191 super(WebrtcStresstestPageSet, self).__init__(
192 archive_data_file='data/webrtc_stresstest_cases.json',
193 cloud_storage_bucket=story.PUBLIC_BUCKET)
194
195 self.AddStory(Page9(self))
196
197
167 class WebrtcPeerconnectionPageSet(story.StorySet): 198 class WebrtcPeerconnectionPageSet(story.StorySet):
168 """WebRTC tests for Real-time video and audio communication.""" 199 """WebRTC tests for Real-time video and audio communication."""
169 200
170 def __init__(self): 201 def __init__(self):
171 super(WebrtcPeerconnectionPageSet, self).__init__( 202 super(WebrtcPeerconnectionPageSet, self).__init__(
172 archive_data_file='data/webrtc_peerconnection_cases.json', 203 archive_data_file='data/webrtc_peerconnection_cases.json',
173 cloud_storage_bucket=story.PUBLIC_BUCKET) 204 cloud_storage_bucket=story.PUBLIC_BUCKET)
174 205
175 self.AddStory(Page2(self)) 206 self.AddStory(Page2(self))
176 207
(...skipping 26 matching lines...) Expand all
203 class WebrtcRenderingPageSet(story.StorySet): 234 class WebrtcRenderingPageSet(story.StorySet):
204 """WebRTC tests for video rendering.""" 235 """WebRTC tests for video rendering."""
205 236
206 def __init__(self): 237 def __init__(self):
207 super(WebrtcRenderingPageSet, self).__init__( 238 super(WebrtcRenderingPageSet, self).__init__(
208 archive_data_file='data/webrtc_smoothness_cases.json', 239 archive_data_file='data/webrtc_smoothness_cases.json',
209 cloud_storage_bucket=story.PARTNER_BUCKET) 240 cloud_storage_bucket=story.PARTNER_BUCKET)
210 241
211 self.AddStory(Page2(self)) 242 self.AddStory(Page2(self))
212 self.AddStory(Page8(self)) 243 self.AddStory(Page8(self))
OLDNEW
« no previous file with comments | « tools/perf/page_sets/data/webrtc_stresstest_cases_000.wpr.sha1 ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698