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

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

Issue 1333153002: Revert of [Pywebsocket PerformanceTests 2/2] Add blink_perf.pywebsocket (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months 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/benchmarks/pywebsocket_server.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 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 import os 5 import os
6 6
7 from core import perf_benchmark 7 from core import perf_benchmark
8 8
9 from telemetry import benchmark 9 from telemetry import benchmark
10 from telemetry.core import util 10 from telemetry.core import util
11 from telemetry import page as page_module 11 from telemetry import page as page_module
12 from telemetry.page import page_test 12 from telemetry.page import page_test
13 from telemetry.page import shared_page_state 13 from telemetry.page import shared_page_state
14 from telemetry import story 14 from telemetry import story
15 from telemetry.value import list_of_scalar_values 15 from telemetry.value import list_of_scalar_values
16 16
17 from benchmarks import pywebsocket_server
18 from page_sets import webgl_supported_shared_state 17 from page_sets import webgl_supported_shared_state
19 18
20 19
21 BLINK_PERF_BASE_DIR = os.path.join(util.GetChromiumSrcDir(), 20 BLINK_PERF_BASE_DIR = os.path.join(util.GetChromiumSrcDir(),
22 'third_party', 'WebKit', 'PerformanceTests') 21 'third_party', 'WebKit', 'PerformanceTests')
23 SKIPPED_FILE = os.path.join(BLINK_PERF_BASE_DIR, 'Skipped') 22 SKIPPED_FILE = os.path.join(BLINK_PERF_BASE_DIR, 'Skipped')
24 23
25 24
26 def CreateStorySetFromPath(path, skipped_file, 25 def CreateStorySetFromPath(path, skipped_file,
27 shared_page_state_class=( 26 shared_page_state_class=(
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 self._blink_perf_js += '\nwindow.fullFrameMeasurement = true;' 116 self._blink_perf_js += '\nwindow.fullFrameMeasurement = true;'
118 117
119 def CustomizeBrowserOptions(self, options): 118 def CustomizeBrowserOptions(self, options):
120 super(_BlinkPerfFullFrameMeasurement, self).CustomizeBrowserOptions( 119 super(_BlinkPerfFullFrameMeasurement, self).CustomizeBrowserOptions(
121 options) 120 options)
122 # Full layout measurement needs content_shell with internals testing API. 121 # Full layout measurement needs content_shell with internals testing API.
123 assert 'content-shell' in options.browser_type 122 assert 'content-shell' in options.browser_type
124 options.AppendExtraBrowserArgs(['--expose-internals-for-testing']) 123 options.AppendExtraBrowserArgs(['--expose-internals-for-testing'])
125 124
126 125
127 class _BlinkPerfPywebsocketMeasurement(_BlinkPerfMeasurement):
128 def CustomizeBrowserOptions(self, options):
129 super(_BlinkPerfPywebsocketMeasurement, self).CustomizeBrowserOptions(
130 options)
131 # Cross-origin accesses are needed to run benchmarks spanning two servers,
132 # the Telemetry's HTTP server and the pywebsocket server.
133 options.AppendExtraBrowserArgs(['--disable-web-security'])
134
135
136 class _SharedPywebsocketPageState(shared_page_state.SharedPageState):
137 """Runs a pywebsocket server."""
138 def __init__(self, test, finder_options, user_story_set):
139 super(_SharedPywebsocketPageState, self).__init__(
140 test, finder_options, user_story_set)
141 self._pywebsocket_server = pywebsocket_server.PywebsocketServer()
142 self.platform.StartLocalServer(self._pywebsocket_server)
143
144 def TearDownState(self):
145 super(_SharedPywebsocketPageState, self).TearDownState()
146 self._pywebsocket_server.Close()
147
148
149 class BlinkPerfBindings(perf_benchmark.PerfBenchmark): 126 class BlinkPerfBindings(perf_benchmark.PerfBenchmark):
150 tag = 'bindings' 127 tag = 'bindings'
151 test = _BlinkPerfMeasurement 128 test = _BlinkPerfMeasurement
152 129
153 @classmethod 130 @classmethod
154 def Name(cls): 131 def Name(cls):
155 return 'blink_perf.bindings' 132 return 'blink_perf.bindings'
156 133
157 def CreateStorySet(self, options): 134 def CreateStorySet(self, options):
158 path = os.path.join(BLINK_PERF_BASE_DIR, 'Bindings') 135 path = os.path.join(BLINK_PERF_BASE_DIR, 'Bindings')
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 tag = 'xml_http_request' 294 tag = 'xml_http_request'
318 test = _BlinkPerfMeasurement 295 test = _BlinkPerfMeasurement
319 296
320 @classmethod 297 @classmethod
321 def Name(cls): 298 def Name(cls):
322 return 'blink_perf.xml_http_request' 299 return 'blink_perf.xml_http_request'
323 300
324 def CreateStorySet(self, options): 301 def CreateStorySet(self, options):
325 path = os.path.join(BLINK_PERF_BASE_DIR, 'XMLHttpRequest') 302 path = os.path.join(BLINK_PERF_BASE_DIR, 'XMLHttpRequest')
326 return CreateStorySetFromPath(path, SKIPPED_FILE) 303 return CreateStorySetFromPath(path, SKIPPED_FILE)
327
328
329 # Disabled due to https://crbug.com/521887
330 @benchmark.Disabled('win', 'chromeos')
331 class BlinkPerfPywebsocket(perf_benchmark.PerfBenchmark):
332 tag = 'pywebsocket'
333 test = _BlinkPerfPywebsocketMeasurement
334
335 @classmethod
336 def Name(cls):
337 return 'blink_perf.pywebsocket'
338
339 def CreateStorySet(self, options):
340 path = os.path.join(BLINK_PERF_BASE_DIR, 'Pywebsocket')
341 return CreateStorySetFromPath(path, SKIPPED_FILE,
342 shared_page_state_class=_SharedPywebsocketPageState)
OLDNEW
« no previous file with comments | « no previous file | tools/perf/benchmarks/pywebsocket_server.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698