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

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: 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/measurements/webrtc.py ('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/',
sullivan 2016/11/01 12:39:23 Has this already been added to cloud storage?
ehmaldonado_chromium 2016/11/01 13:27:26 It has now. Thanks :)
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 action_runner.ExecuteJavaScript(
170 'document.getElementById("peer-connections-input").value=15')
ehmaldonado_chromium 2016/10/31 16:29:19 I couldn't figure out how to set the slider or the
sullivan 2016/11/01 12:39:23 Should there be a comment in the code explaining a
ehmaldonado_chromium 2016/11/01 13:27:26 Done. This is supposed to set the number of peer c
171 action_runner.ClickElement('button[id="start-test-button"]')
172 action_runner.Wait(45)
173
174
156 class WebrtcGetusermediaPageSet(story.StorySet): 175 class WebrtcGetusermediaPageSet(story.StorySet):
157 """WebRTC tests for local getUserMedia: video capture and playback.""" 176 """WebRTC tests for local getUserMedia: video capture and playback."""
158 177
159 def __init__(self): 178 def __init__(self):
160 super(WebrtcGetusermediaPageSet, self).__init__( 179 super(WebrtcGetusermediaPageSet, self).__init__(
161 archive_data_file='data/webrtc_getusermedia_cases.json', 180 archive_data_file='data/webrtc_getusermedia_cases.json',
162 cloud_storage_bucket=story.PUBLIC_BUCKET) 181 cloud_storage_bucket=story.PUBLIC_BUCKET)
163 182
164 self.AddStory(Page1(self)) 183 self.AddStory(Page1(self))
165 184
166 185
186 class WebrtcStresstestPageSet(story.StorySet):
187 """WebRTC stress-testing with multiple peer connections."""
188
189 def __init__(self):
190 super(WebrtcStresstestPageSet, self).__init__(
191 archive_data_file='data/webrtc_stresstest_cases.json',
192 cloud_storage_bucket=story.PUBLIC_BUCKET)
193
194 self.AddStory(Page9(self))
195
196
167 class WebrtcPeerconnectionPageSet(story.StorySet): 197 class WebrtcPeerconnectionPageSet(story.StorySet):
168 """WebRTC tests for Real-time video and audio communication.""" 198 """WebRTC tests for Real-time video and audio communication."""
169 199
170 def __init__(self): 200 def __init__(self):
171 super(WebrtcPeerconnectionPageSet, self).__init__( 201 super(WebrtcPeerconnectionPageSet, self).__init__(
172 archive_data_file='data/webrtc_peerconnection_cases.json', 202 archive_data_file='data/webrtc_peerconnection_cases.json',
173 cloud_storage_bucket=story.PUBLIC_BUCKET) 203 cloud_storage_bucket=story.PUBLIC_BUCKET)
174 204
175 self.AddStory(Page2(self)) 205 self.AddStory(Page2(self))
176 206
(...skipping 26 matching lines...) Expand all
203 class WebrtcRenderingPageSet(story.StorySet): 233 class WebrtcRenderingPageSet(story.StorySet):
204 """WebRTC tests for video rendering.""" 234 """WebRTC tests for video rendering."""
205 235
206 def __init__(self): 236 def __init__(self):
207 super(WebrtcRenderingPageSet, self).__init__( 237 super(WebrtcRenderingPageSet, self).__init__(
208 archive_data_file='data/webrtc_smoothness_cases.json', 238 archive_data_file='data/webrtc_smoothness_cases.json',
209 cloud_storage_bucket=story.PARTNER_BUCKET) 239 cloud_storage_bucket=story.PARTNER_BUCKET)
210 240
211 self.AddStory(Page2(self)) 241 self.AddStory(Page2(self))
212 self.AddStory(Page8(self)) 242 self.AddStory(Page8(self))
OLDNEW
« no previous file with comments | « tools/perf/measurements/webrtc.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698