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 common.chrome_proxy_benchmark import ChromeProxyBenchmark | 5 from common.chrome_proxy_benchmark import ChromeProxyBenchmark |
6 from integration_tests import chrome_proxy_pagesets as pagesets | 6 from integration_tests import chrome_proxy_pagesets as pagesets |
7 from integration_tests import chrome_proxy_measurements as measurements | 7 from integration_tests import chrome_proxy_measurements as measurements |
8 from telemetry import benchmark | 8 from telemetry import benchmark |
9 from telemetry.core.backends.chrome import android_browser_finder | 9 from telemetry.core.backends.chrome import android_browser_finder |
| 10 from telemetry.core.backends.chrome import cros_browser_finder |
| 11 from telemetry.core.backends.chrome import desktop_browser_finder |
10 | 12 |
11 | 13 |
12 ANDROID_CHROME_BROWSERS = [ | 14 ANDROID_CHROME_BROWSERS = [ |
13 browser for browser in android_browser_finder.CHROME_PACKAGE_NAMES | 15 browser for browser in android_browser_finder.CHROME_PACKAGE_NAMES |
14 if 'webview' not in browser] | 16 if 'webview' not in browser] |
15 | 17 |
| 18 DESKTOP_CHROME_BROWSERS = (desktop_browser_finder.FindAllBrowserTypes(None) + |
| 19 cros_browser_finder.FindAllBrowserTypes(None)) |
16 | 20 |
17 class ChromeProxyClientVersion(ChromeProxyBenchmark): | 21 class ChromeProxyClientVersion(ChromeProxyBenchmark): |
18 tag = 'client_version' | 22 tag = 'client_version' |
19 test = measurements.ChromeProxyClientVersion | 23 test = measurements.ChromeProxyClientVersion |
20 page_set = pagesets.SyntheticPageSet | 24 page_set = pagesets.SyntheticPageSet |
21 | 25 |
22 @classmethod | 26 @classmethod |
23 def Name(cls): | 27 def Name(cls): |
24 return 'chrome_proxy_benchmark.client_version.synthetic' | 28 return 'chrome_proxy_benchmark.client_version.synthetic' |
25 | 29 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 # Safebrowsing is switched off for Android Webview and all desktop platforms. | 109 # Safebrowsing is switched off for Android Webview and all desktop platforms. |
106 class ChromeProxySafeBrowsingOff(ChromeProxyBenchmark): | 110 class ChromeProxySafeBrowsingOff(ChromeProxyBenchmark): |
107 tag = 'safebrowsing_off' | 111 tag = 'safebrowsing_off' |
108 test = measurements.ChromeProxySafebrowsingOff | 112 test = measurements.ChromeProxySafebrowsingOff |
109 page_set = pagesets.SafebrowsingPageSet | 113 page_set = pagesets.SafebrowsingPageSet |
110 | 114 |
111 @classmethod | 115 @classmethod |
112 def Name(cls): | 116 def Name(cls): |
113 return 'chrome_proxy_benchmark.safebrowsing_off.safebrowsing' | 117 return 'chrome_proxy_benchmark.safebrowsing_off.safebrowsing' |
114 | 118 |
| 119 |
115 class ChromeProxyHTTPFallbackProbeURL(ChromeProxyBenchmark): | 120 class ChromeProxyHTTPFallbackProbeURL(ChromeProxyBenchmark): |
116 tag = 'fallback_probe' | 121 tag = 'fallback_probe' |
117 test = measurements.ChromeProxyHTTPFallbackProbeURL | 122 test = measurements.ChromeProxyHTTPFallbackProbeURL |
118 page_set = pagesets.SyntheticPageSet | 123 page_set = pagesets.SyntheticPageSet |
119 | 124 |
120 @classmethod | 125 @classmethod |
121 def Name(cls): | 126 def Name(cls): |
122 return 'chrome_proxy_benchmark.fallback_probe.synthetic' | 127 return 'chrome_proxy_benchmark.fallback_probe.synthetic' |
123 | 128 |
124 | 129 |
(...skipping 29 matching lines...) Expand all Loading... |
154 | 159 |
155 | 160 |
156 class ChromeProxySmoke(ChromeProxyBenchmark): | 161 class ChromeProxySmoke(ChromeProxyBenchmark): |
157 tag = 'smoke' | 162 tag = 'smoke' |
158 test = measurements.ChromeProxySmoke | 163 test = measurements.ChromeProxySmoke |
159 page_set = pagesets.SmokePageSet | 164 page_set = pagesets.SmokePageSet |
160 | 165 |
161 @classmethod | 166 @classmethod |
162 def Name(cls): | 167 def Name(cls): |
163 return 'chrome_proxy_benchmark.smoke.smoke' | 168 return 'chrome_proxy_benchmark.smoke.smoke' |
| 169 |
| 170 |
| 171 @benchmark.Enabled(*DESKTOP_CHROME_BROWSERS) |
| 172 class ChromeProxyVideoDirect(benchmark.Benchmark): |
| 173 tag = 'video' |
| 174 test = measurements.ChromeProxyVideoValidation |
| 175 page_set = pagesets.VideoDirectPageSet |
| 176 |
| 177 @classmethod |
| 178 def Name(cls): |
| 179 return 'chrome_proxy_benchmark.video.direct' |
| 180 |
| 181 |
| 182 @benchmark.Enabled(*DESKTOP_CHROME_BROWSERS) |
| 183 class ChromeProxyVideoProxied(benchmark.Benchmark): |
| 184 tag = 'video' |
| 185 test = measurements.ChromeProxyVideoValidation |
| 186 page_set = pagesets.VideoProxiedPageSet |
| 187 |
| 188 @classmethod |
| 189 def Name(cls): |
| 190 return 'chrome_proxy_benchmark.video.proxied' |
| 191 |
| 192 |
| 193 @benchmark.Enabled(*DESKTOP_CHROME_BROWSERS) |
| 194 class ChromeProxyVideoCompare(benchmark.Benchmark): |
| 195 """Comparison of direct and proxied video fetches. |
| 196 |
| 197 This benchmark runs the ChromeProxyVideoDirect and ChromeProxyVideoProxied |
| 198 benchmarks, then compares their results. |
| 199 """ |
| 200 |
| 201 tag = 'video' |
| 202 test = measurements.ChromeProxyVideoValidation |
| 203 page_set = pagesets.VideoComparePageSet |
| 204 |
| 205 @classmethod |
| 206 def Name(cls): |
| 207 return 'chrome_proxy_benchmark.video.compare' |
OLD | NEW |