Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 telemetry import benchmark | 7 from telemetry import benchmark |
| 8 from telemetry.core import util | 8 from telemetry.core import util |
| 9 from telemetry.page import page_set | 9 from telemetry.page import page_set |
| 10 from telemetry.page import page_test | 10 from telemetry.page import page_test |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 90 units = parts[-1] | 90 units = parts[-1] |
| 91 metric = page.display_name.split('.')[0].replace('/', '_') | 91 metric = page.display_name.split('.')[0].replace('/', '_') |
| 92 results.AddValue(list_of_scalar_values.ListOfScalarValues( | 92 results.AddValue(list_of_scalar_values.ListOfScalarValues( |
| 93 results.current_page, metric, units, values)) | 93 results.current_page, metric, units, values)) |
| 94 | 94 |
| 95 break | 95 break |
| 96 | 96 |
| 97 print log | 97 print log |
| 98 | 98 |
| 99 | 99 |
| 100 class _BlinkPerfFullLayoutMeasurement(_BlinkPerfMeasurement): | |
| 101 def __init__(self): | |
| 102 super(_BlinkPerfFullLayoutMeasurement, self).__init__() | |
| 103 self._blink_perf_js += '\nwindow.fullLayoutMeasurement = true;' | |
| 104 | |
| 105 def CustomizeBrowserOptions(self, options): | |
| 106 super(_BlinkPerfFullLayoutMeasurement, self).CustomizeBrowserOptions( | |
| 107 options) | |
| 108 | |
| 109 # Full layout measurement needs content_shell with internals testing API. | |
| 110 if options.browser_type == 'release': | |
| 111 options.browser_type = 'content-shell-release' | |
| 112 elif options.browser_type == 'debug': | |
| 113 options.browser_type = 'content-shell-debug' | |
|
Xianzhu
2014/10/29 16:54:58
Here browser_type is still forced, but it is for t
| |
| 114 options.AppendExtraBrowserArgs(['--expose-internals-for-testing']) | |
| 115 | |
| 116 | |
| 100 class BlinkPerfAnimation(benchmark.Benchmark): | 117 class BlinkPerfAnimation(benchmark.Benchmark): |
| 101 tag = 'animation' | 118 tag = 'animation' |
| 102 test = _BlinkPerfMeasurement | 119 test = _BlinkPerfMeasurement |
| 103 | 120 |
| 104 def CreatePageSet(self, options): | 121 def CreatePageSet(self, options): |
| 105 path = os.path.join(BLINK_PERF_BASE_DIR, 'Animation') | 122 path = os.path.join(BLINK_PERF_BASE_DIR, 'Animation') |
| 106 return _CreatePageSetFromPath(path, SKIPPED_FILE) | 123 return _CreatePageSetFromPath(path, SKIPPED_FILE) |
| 107 | 124 |
| 108 | 125 |
| 109 class BlinkPerfBindings(benchmark.Benchmark): | 126 class BlinkPerfBindings(benchmark.Benchmark): |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 162 | 179 |
| 163 class BlinkPerfLayout(benchmark.Benchmark): | 180 class BlinkPerfLayout(benchmark.Benchmark): |
| 164 tag = 'layout' | 181 tag = 'layout' |
| 165 test = _BlinkPerfMeasurement | 182 test = _BlinkPerfMeasurement |
| 166 | 183 |
| 167 def CreatePageSet(self, options): | 184 def CreatePageSet(self, options): |
| 168 path = os.path.join(BLINK_PERF_BASE_DIR, 'Layout') | 185 path = os.path.join(BLINK_PERF_BASE_DIR, 'Layout') |
| 169 return _CreatePageSetFromPath(path, SKIPPED_FILE) | 186 return _CreatePageSetFromPath(path, SKIPPED_FILE) |
| 170 | 187 |
| 171 | 188 |
| 189 class BlinkPerfLayoutFullLayout(BlinkPerfLayout): | |
| 190 tag = 'layout_full_layout' | |
| 191 test = _BlinkPerfFullLayoutMeasurement | |
| 192 | |
| 193 | |
| 172 class BlinkPerfMutation(benchmark.Benchmark): | 194 class BlinkPerfMutation(benchmark.Benchmark): |
| 173 tag = 'mutation' | 195 tag = 'mutation' |
| 174 test = _BlinkPerfMeasurement | 196 test = _BlinkPerfMeasurement |
| 175 | 197 |
| 176 def CreatePageSet(self, options): | 198 def CreatePageSet(self, options): |
| 177 path = os.path.join(BLINK_PERF_BASE_DIR, 'Mutation') | 199 path = os.path.join(BLINK_PERF_BASE_DIR, 'Mutation') |
| 178 return _CreatePageSetFromPath(path, SKIPPED_FILE) | 200 return _CreatePageSetFromPath(path, SKIPPED_FILE) |
| 179 | 201 |
| 180 | 202 |
| 181 class BlinkPerfParser(benchmark.Benchmark): | 203 class BlinkPerfParser(benchmark.Benchmark): |
| 182 tag = 'parser' | 204 tag = 'parser' |
| 183 test = _BlinkPerfMeasurement | 205 test = _BlinkPerfMeasurement |
| 184 | 206 |
| 185 def CreatePageSet(self, options): | 207 def CreatePageSet(self, options): |
| 186 path = os.path.join(BLINK_PERF_BASE_DIR, 'Parser') | 208 path = os.path.join(BLINK_PERF_BASE_DIR, 'Parser') |
| 187 return _CreatePageSetFromPath(path, SKIPPED_FILE) | 209 return _CreatePageSetFromPath(path, SKIPPED_FILE) |
| 188 | 210 |
| 189 | 211 |
| 190 class BlinkPerfSVG(benchmark.Benchmark): | 212 class BlinkPerfSVG(benchmark.Benchmark): |
| 191 tag = 'svg' | 213 tag = 'svg' |
| 192 test = _BlinkPerfMeasurement | 214 test = _BlinkPerfMeasurement |
| 193 | 215 |
| 194 def CreatePageSet(self, options): | 216 def CreatePageSet(self, options): |
| 195 path = os.path.join(BLINK_PERF_BASE_DIR, 'SVG') | 217 path = os.path.join(BLINK_PERF_BASE_DIR, 'SVG') |
| 196 return _CreatePageSetFromPath(path, SKIPPED_FILE) | 218 return _CreatePageSetFromPath(path, SKIPPED_FILE) |
| 197 | 219 |
| 198 | 220 |
| 221 class BlinkPerfSVGFullLayout(BlinkPerfSVG): | |
| 222 tag = 'svg_full_layout' | |
| 223 test = _BlinkPerfFullLayoutMeasurement | |
| 224 | |
| 225 | |
| 199 class BlinkPerfShadowDOM(benchmark.Benchmark): | 226 class BlinkPerfShadowDOM(benchmark.Benchmark): |
| 200 tag = 'shadow_dom' | 227 tag = 'shadow_dom' |
| 201 test = _BlinkPerfMeasurement | 228 test = _BlinkPerfMeasurement |
| 202 | 229 |
| 203 def CreatePageSet(self, options): | 230 def CreatePageSet(self, options): |
| 204 path = os.path.join(BLINK_PERF_BASE_DIR, 'ShadowDOM') | 231 path = os.path.join(BLINK_PERF_BASE_DIR, 'ShadowDOM') |
| 205 return _CreatePageSetFromPath(path, SKIPPED_FILE) | 232 return _CreatePageSetFromPath(path, SKIPPED_FILE) |
| 206 | 233 |
| 207 | 234 |
| 208 class BlinkPerfXMLHttpRequest(benchmark.Benchmark): | 235 class BlinkPerfXMLHttpRequest(benchmark.Benchmark): |
| 209 tag = 'xml_http_request' | 236 tag = 'xml_http_request' |
| 210 test = _BlinkPerfMeasurement | 237 test = _BlinkPerfMeasurement |
| 211 | 238 |
| 212 def CreatePageSet(self, options): | 239 def CreatePageSet(self, options): |
| 213 path = os.path.join(BLINK_PERF_BASE_DIR, 'XMLHttpRequest') | 240 path = os.path.join(BLINK_PERF_BASE_DIR, 'XMLHttpRequest') |
| 214 return _CreatePageSetFromPath(path, SKIPPED_FILE) | 241 return _CreatePageSetFromPath(path, SKIPPED_FILE) |
| OLD | NEW |