OLD | NEW |
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 integration_tests import chrome_proxy_measurements as measurements | 5 from integration_tests import chrome_proxy_measurements as measurements |
6 from integration_tests import chrome_proxy_pagesets as pagesets | 6 from integration_tests import chrome_proxy_pagesets as pagesets |
7 from telemetry import benchmark | 7 from telemetry import benchmark |
8 from telemetry.core.backends.chrome import android_browser_finder | 8 from telemetry.core.backends.chrome import android_browser_finder |
| 9 from telemetry.core.backends.chrome import cros_browser_finder |
| 10 from telemetry.core.backends.chrome import desktop_browser_finder |
9 | 11 |
10 | 12 |
11 ANDROID_CHROME_BROWSERS = [ | 13 ANDROID_CHROME_BROWSERS = [ |
12 browser for browser in android_browser_finder.CHROME_PACKAGE_NAMES | 14 browser for browser in android_browser_finder.CHROME_PACKAGE_NAMES |
13 if 'webview' not in browser] | 15 if 'webview' not in browser] |
14 | 16 |
| 17 DESKTOP_CHROME_BROWSERS = (desktop_browser_finder.FindAllBrowserTypes(None) + |
| 18 cros_browser_finder.FindAllBrowserTypes(None)) |
| 19 |
15 class ChromeProxyLatency(benchmark.Benchmark): | 20 class ChromeProxyLatency(benchmark.Benchmark): |
16 tag = 'latency' | 21 tag = 'latency' |
17 test = measurements.ChromeProxyLatency | 22 test = measurements.ChromeProxyLatency |
18 page_set = pagesets.Top20PageSet | 23 page_set = pagesets.Top20PageSet |
19 | 24 |
20 @classmethod | 25 @classmethod |
21 def Name(cls): | 26 def Name(cls): |
22 return 'chrome_proxy_benchmark.latency.top_20' | 27 return 'chrome_proxy_benchmark.latency.top_20' |
23 | 28 |
24 | 29 |
25 class ChromeProxyLatencyDirect(benchmark.Benchmark): | 30 class ChromeProxyLatencyDirect(benchmark.Benchmark): |
26 tag = 'latency_direct' | 31 tag = 'latency_direct' |
27 test = measurements.ChromeProxyLatency | 32 test = measurements.ChromeProxyLatencyDirect |
28 page_set = pagesets.Top20PageSet | 33 page_set = pagesets.Top20PageSet |
29 | 34 |
30 @classmethod | 35 @classmethod |
31 def Name(cls): | 36 def Name(cls): |
32 return 'chrome_proxy_benchmark.latency_direct.top_20' | 37 return 'chrome_proxy_benchmark.latency_direct.top_20' |
33 | 38 |
34 | 39 |
35 class ChromeProxyLatencySynthetic(ChromeProxyLatency): | 40 class ChromeProxyLatencySynthetic(ChromeProxyLatency): |
36 page_set = pagesets.SyntheticPageSet | 41 page_set = pagesets.SyntheticPageSet |
37 | 42 |
(...skipping 15 matching lines...) Expand all Loading... |
53 test = measurements.ChromeProxyDataSaving | 58 test = measurements.ChromeProxyDataSaving |
54 page_set = pagesets.Top20PageSet | 59 page_set = pagesets.Top20PageSet |
55 | 60 |
56 @classmethod | 61 @classmethod |
57 def Name(cls): | 62 def Name(cls): |
58 return 'chrome_proxy_benchmark.data_saving.top_20' | 63 return 'chrome_proxy_benchmark.data_saving.top_20' |
59 | 64 |
60 | 65 |
61 class ChromeProxyDataSavingDirect(benchmark.Benchmark): | 66 class ChromeProxyDataSavingDirect(benchmark.Benchmark): |
62 tag = 'data_saving_direct' | 67 tag = 'data_saving_direct' |
63 test = measurements.ChromeProxyDataSaving | 68 test = measurements.ChromeProxyDataSavingDirect |
64 page_set = pagesets.Top20PageSet | 69 page_set = pagesets.Top20PageSet |
65 | 70 |
66 @classmethod | 71 @classmethod |
67 def Name(cls): | 72 def Name(cls): |
68 return 'chrome_proxy_benchmark.data_saving_direct.top_20' | 73 return 'chrome_proxy_benchmark.data_saving_direct.top_20' |
69 | 74 |
70 | 75 |
71 class ChromeProxyDataSavingSynthetic(ChromeProxyDataSaving): | 76 class ChromeProxyDataSavingSynthetic(ChromeProxyDataSaving): |
72 page_set = pagesets.SyntheticPageSet | 77 page_set = pagesets.SyntheticPageSet |
73 | 78 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 # Safebrowsing is switched off for Android Webview and all desktop platforms. | 199 # Safebrowsing is switched off for Android Webview and all desktop platforms. |
195 class ChromeProxySafeBrowsingOff(ChromeProxyBenchmark): | 200 class ChromeProxySafeBrowsingOff(ChromeProxyBenchmark): |
196 tag = 'safebrowsing_off' | 201 tag = 'safebrowsing_off' |
197 test = measurements.ChromeProxySafebrowsingOff | 202 test = measurements.ChromeProxySafebrowsingOff |
198 page_set = pagesets.SafebrowsingPageSet | 203 page_set = pagesets.SafebrowsingPageSet |
199 | 204 |
200 @classmethod | 205 @classmethod |
201 def Name(cls): | 206 def Name(cls): |
202 return 'chrome_proxy_benchmark.safebrowsing_off.safebrowsing' | 207 return 'chrome_proxy_benchmark.safebrowsing_off.safebrowsing' |
203 | 208 |
| 209 |
204 class ChromeProxyHTTPFallbackProbeURL(ChromeProxyBenchmark): | 210 class ChromeProxyHTTPFallbackProbeURL(ChromeProxyBenchmark): |
205 tag = 'fallback_probe' | 211 tag = 'fallback_probe' |
206 test = measurements.ChromeProxyHTTPFallbackProbeURL | 212 test = measurements.ChromeProxyHTTPFallbackProbeURL |
207 page_set = pagesets.SyntheticPageSet | 213 page_set = pagesets.SyntheticPageSet |
208 | 214 |
209 @classmethod | 215 @classmethod |
210 def Name(cls): | 216 def Name(cls): |
211 return 'chrome_proxy_benchmark.fallback_probe.synthetic' | 217 return 'chrome_proxy_benchmark.fallback_probe.synthetic' |
212 | 218 |
213 | 219 |
(...skipping 29 matching lines...) Expand all Loading... |
243 | 249 |
244 | 250 |
245 class ChromeProxySmoke(ChromeProxyBenchmark): | 251 class ChromeProxySmoke(ChromeProxyBenchmark): |
246 tag = 'smoke' | 252 tag = 'smoke' |
247 test = measurements.ChromeProxySmoke | 253 test = measurements.ChromeProxySmoke |
248 page_set = pagesets.SmokePageSet | 254 page_set = pagesets.SmokePageSet |
249 | 255 |
250 @classmethod | 256 @classmethod |
251 def Name(cls): | 257 def Name(cls): |
252 return 'chrome_proxy_benchmark.smoke.smoke' | 258 return 'chrome_proxy_benchmark.smoke.smoke' |
| 259 |
| 260 |
| 261 @benchmark.Enabled(*DESKTOP_CHROME_BROWSERS) |
| 262 class ChromeProxyVideoDirect(benchmark.Benchmark): |
| 263 tag = 'video' |
| 264 test = measurements.ChromeProxyVideoValidation |
| 265 page_set = pagesets.VideoDirectPageSet |
| 266 |
| 267 @classmethod |
| 268 def Name(cls): |
| 269 return 'chrome_proxy_benchmark.video.direct' |
| 270 |
| 271 |
| 272 @benchmark.Enabled(*DESKTOP_CHROME_BROWSERS) |
| 273 class ChromeProxyVideoProxied(benchmark.Benchmark): |
| 274 tag = 'video' |
| 275 test = measurements.ChromeProxyVideoValidation |
| 276 page_set = pagesets.VideoProxiedPageSet |
| 277 |
| 278 @classmethod |
| 279 def Name(cls): |
| 280 return 'chrome_proxy_benchmark.video.proxied' |
| 281 |
| 282 |
| 283 @benchmark.Enabled(*DESKTOP_CHROME_BROWSERS) |
| 284 class ChromeProxyVideoCompare(benchmark.Benchmark): |
| 285 """Comparison of direct and proxied video fetches. |
| 286 |
| 287 This benchmark runs the ChromeProxyVideoDirect and ChromeProxyVideoProxied |
| 288 benchmarks, then compares their results. |
| 289 """ |
| 290 |
| 291 tag = 'video' |
| 292 test = measurements.ChromeProxyVideoValidation |
| 293 page_set = pagesets.VideoComparePageSet |
| 294 |
| 295 @classmethod |
| 296 def Name(cls): |
| 297 return 'chrome_proxy_benchmark.video.compare' |
OLD | NEW |