| 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 | 9 |
| 9 | 10 |
| 11 ANDROID_CHROME_BROWSERS = [ |
| 12 browser for browser in android_browser_finder.CHROME_PACKAGE_NAMES |
| 13 if 'webview' not in browser] |
| 14 |
| 10 class ChromeProxyLatency(benchmark.Benchmark): | 15 class ChromeProxyLatency(benchmark.Benchmark): |
| 11 tag = 'latency' | 16 tag = 'latency' |
| 12 test = measurements.ChromeProxyLatency | 17 test = measurements.ChromeProxyLatency |
| 13 page_set = pagesets.Top20PageSet | 18 page_set = pagesets.Top20PageSet |
| 14 | 19 |
| 15 @classmethod | 20 @classmethod |
| 16 def Name(cls): | 21 def Name(cls): |
| 17 return 'chrome_proxy_benchmark.latency.top_20' | 22 return 'chrome_proxy_benchmark.latency.top_20' |
| 18 | 23 |
| 19 | 24 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 class ChromeProxyBlockOnce(benchmark.Benchmark): | 147 class ChromeProxyBlockOnce(benchmark.Benchmark): |
| 143 tag = 'block_once' | 148 tag = 'block_once' |
| 144 test = measurements.ChromeProxyBlockOnce | 149 test = measurements.ChromeProxyBlockOnce |
| 145 page_set = pagesets.BlockOncePageSet | 150 page_set = pagesets.BlockOncePageSet |
| 146 | 151 |
| 147 @classmethod | 152 @classmethod |
| 148 def Name(cls): | 153 def Name(cls): |
| 149 return 'chrome_proxy_benchmark.block_once.block_once' | 154 return 'chrome_proxy_benchmark.block_once.block_once' |
| 150 | 155 |
| 151 | 156 |
| 152 @benchmark.Enabled('android') | 157 @benchmark.Enabled(*ANDROID_CHROME_BROWSERS) |
| 153 # Safebrowsing is enabled for Android and iOS. | 158 # Safebrowsing is enabled for Android and iOS. |
| 154 class ChromeProxySafeBrowsingOn(benchmark.Benchmark): | 159 class ChromeProxySafeBrowsingOn(benchmark.Benchmark): |
| 155 tag = 'safebrowsing_on' | 160 tag = 'safebrowsing_on' |
| 156 test = measurements.ChromeProxySafebrowsingOn | 161 test = measurements.ChromeProxySafebrowsingOn |
| 157 page_set = pagesets.SafebrowsingPageSet | 162 page_set = pagesets.SafebrowsingPageSet |
| 158 | 163 |
| 159 @classmethod | 164 @classmethod |
| 160 def Name(cls): | 165 def Name(cls): |
| 161 return 'chrome_proxy_benchmark.safebrowsing_on.safebrowsing' | 166 return 'chrome_proxy_benchmark.safebrowsing_on.safebrowsing' |
| 162 | 167 |
| 163 | 168 |
| 169 @benchmark.Disabled(*ANDROID_CHROME_BROWSERS) |
| 164 # Safebrowsing is switched off for Android Webview and all desktop platforms. | 170 # Safebrowsing is switched off for Android Webview and all desktop platforms. |
| 165 class ChromeProxySafeBrowsingOff(benchmark.Benchmark): | 171 class ChromeProxySafeBrowsingOff(benchmark.Benchmark): |
| 166 tag = 'safebrowsing_off' | 172 tag = 'safebrowsing_off' |
| 167 test = measurements.ChromeProxySafebrowsingOff | 173 test = measurements.ChromeProxySafebrowsingOff |
| 168 page_set = pagesets.SafebrowsingPageSet | 174 page_set = pagesets.SafebrowsingPageSet |
| 169 | 175 |
| 170 @classmethod | 176 @classmethod |
| 171 def Name(cls): | 177 def Name(cls): |
| 172 return 'chrome_proxy_benchmark.safebrowsing_off.safebrowsing' | 178 return 'chrome_proxy_benchmark.safebrowsing_off.safebrowsing' |
| 173 | 179 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 | 219 |
| 214 | 220 |
| 215 class ChromeProxySmoke(benchmark.Benchmark): | 221 class ChromeProxySmoke(benchmark.Benchmark): |
| 216 tag = 'smoke' | 222 tag = 'smoke' |
| 217 test = measurements.ChromeProxySmoke | 223 test = measurements.ChromeProxySmoke |
| 218 page_set = pagesets.SmokePageSet | 224 page_set = pagesets.SmokePageSet |
| 219 | 225 |
| 220 @classmethod | 226 @classmethod |
| 221 def Name(cls): | 227 def Name(cls): |
| 222 return 'chrome_proxy_benchmark.smoke.smoke' | 228 return 'chrome_proxy_benchmark.smoke.smoke' |
| OLD | NEW |