Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / tools / chrome_proxy / integration_tests / chrome_proxy_benchmark.py
blobc9961e7718c20978bbf3207b235b2fe48b009528
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
3 # found in the LICENSE file.
5 from integration_tests import chrome_proxy_measurements as measurements
6 from integration_tests import chrome_proxy_pagesets as pagesets
7 from telemetry import benchmark
8 from telemetry.core.backends.chrome import android_browser_finder
11 ANDROID_CHROME_BROWSERS = [
12 browser for browser in android_browser_finder.CHROME_PACKAGE_NAMES
13 if 'webview' not in browser]
15 class ChromeProxyLatency(benchmark.Benchmark):
16 tag = 'latency'
17 test = measurements.ChromeProxyLatency
18 page_set = pagesets.Top20PageSet
20 @classmethod
21 def Name(cls):
22 return 'chrome_proxy_benchmark.latency.top_20'
25 class ChromeProxyLatencyDirect(benchmark.Benchmark):
26 tag = 'latency_direct'
27 test = measurements.ChromeProxyLatency
28 page_set = pagesets.Top20PageSet
30 @classmethod
31 def Name(cls):
32 return 'chrome_proxy_benchmark.latency_direct.top_20'
35 class ChromeProxyLatencySynthetic(ChromeProxyLatency):
36 page_set = pagesets.SyntheticPageSet
38 @classmethod
39 def Name(cls):
40 return 'chrome_proxy_benchmark.latency.synthetic'
43 class ChromeProxyLatencySyntheticDirect(ChromeProxyLatencyDirect):
44 page_set = pagesets.SyntheticPageSet
46 @classmethod
47 def Name(cls):
48 return 'chrome_proxy_benchmark.latency_direct.synthetic'
51 class ChromeProxyDataSaving(benchmark.Benchmark):
52 tag = 'data_saving'
53 test = measurements.ChromeProxyDataSaving
54 page_set = pagesets.Top20PageSet
56 @classmethod
57 def Name(cls):
58 return 'chrome_proxy_benchmark.data_saving.top_20'
61 class ChromeProxyDataSavingDirect(benchmark.Benchmark):
62 tag = 'data_saving_direct'
63 test = measurements.ChromeProxyDataSaving
64 page_set = pagesets.Top20PageSet
66 @classmethod
67 def Name(cls):
68 return 'chrome_proxy_benchmark.data_saving_direct.top_20'
71 class ChromeProxyDataSavingSynthetic(ChromeProxyDataSaving):
72 page_set = pagesets.SyntheticPageSet
74 @classmethod
75 def Name(cls):
76 return 'chrome_proxy_benchmark.data_saving.synthetic'
79 class ChromeProxyDataSavingSyntheticDirect(ChromeProxyDataSavingDirect):
80 page_set = pagesets.SyntheticPageSet
82 @classmethod
83 def Name(cls):
84 return 'chrome_proxy_benchmark.data_saving_direct.synthetic'
87 class ChromeProxyHeaderValidation(benchmark.Benchmark):
88 tag = 'header_validation'
89 test = measurements.ChromeProxyHeaders
90 page_set = pagesets.Top20PageSet
92 @classmethod
93 def Name(cls):
94 return 'chrome_proxy_benchmark.header_validation.top_20'
97 class ChromeProxyClientVersion(benchmark.Benchmark):
98 tag = 'client_version'
99 test = measurements.ChromeProxyClientVersion
100 page_set = pagesets.SyntheticPageSet
102 @classmethod
103 def Name(cls):
104 return 'chrome_proxy_benchmark.client_version.synthetic'
107 class ChromeProxyClientType(benchmark.Benchmark):
108 tag = 'client_type'
109 test = measurements.ChromeProxyClientType
110 page_set = pagesets.ClientTypePageSet
112 @classmethod
113 def Name(cls):
114 return 'chrome_proxy_benchmark.client_type.client_type'
117 class ChromeProxyLoFi(benchmark.Benchmark):
118 tag = 'lo_fi'
119 test = measurements.ChromeProxyLoFi
120 page_set = pagesets.LoFiPageSet
122 @classmethod
123 def Name(cls):
124 return 'chrome_proxy_benchmark.lo_fi.lo_fi'
127 class ChromeProxyBypass(benchmark.Benchmark):
128 tag = 'bypass'
129 test = measurements.ChromeProxyBypass
130 page_set = pagesets.BypassPageSet
132 @classmethod
133 def Name(cls):
134 return 'chrome_proxy_benchmark.bypass.bypass'
137 class ChromeProxyCorsBypass(benchmark.Benchmark):
138 tag = 'bypass'
139 test = measurements.ChromeProxyCorsBypass
140 page_set = pagesets.CorsBypassPageSet
142 @classmethod
143 def Name(cls):
144 return 'chrome_proxy_benchmark.bypass.corsbypass'
147 class ChromeProxyBlockOnce(benchmark.Benchmark):
148 tag = 'block_once'
149 test = measurements.ChromeProxyBlockOnce
150 page_set = pagesets.BlockOncePageSet
152 @classmethod
153 def Name(cls):
154 return 'chrome_proxy_benchmark.block_once.block_once'
157 @benchmark.Enabled(*ANDROID_CHROME_BROWSERS)
158 # Safebrowsing is enabled for Android and iOS.
159 class ChromeProxySafeBrowsingOn(benchmark.Benchmark):
160 tag = 'safebrowsing_on'
161 test = measurements.ChromeProxySafebrowsingOn
162 page_set = pagesets.SafebrowsingPageSet
164 @classmethod
165 def Name(cls):
166 return 'chrome_proxy_benchmark.safebrowsing_on.safebrowsing'
169 @benchmark.Disabled(*ANDROID_CHROME_BROWSERS)
170 # Safebrowsing is switched off for Android Webview and all desktop platforms.
171 class ChromeProxySafeBrowsingOff(benchmark.Benchmark):
172 tag = 'safebrowsing_off'
173 test = measurements.ChromeProxySafebrowsingOff
174 page_set = pagesets.SafebrowsingPageSet
176 @classmethod
177 def Name(cls):
178 return 'chrome_proxy_benchmark.safebrowsing_off.safebrowsing'
180 class ChromeProxyHTTPFallbackProbeURL(benchmark.Benchmark):
181 tag = 'fallback_probe'
182 test = measurements.ChromeProxyHTTPFallbackProbeURL
183 page_set = pagesets.SyntheticPageSet
185 @classmethod
186 def Name(cls):
187 return 'chrome_proxy_benchmark.fallback_probe.synthetic'
190 class ChromeProxyHTTPFallbackViaHeader(benchmark.Benchmark):
191 tag = 'fallback_viaheader'
192 test = measurements.ChromeProxyHTTPFallbackViaHeader
193 page_set = pagesets.FallbackViaHeaderPageSet
195 @classmethod
196 def Name(cls):
197 return 'chrome_proxy_benchmark.fallback_viaheader.fallback_viaheader'
200 class ChromeProxyHTTPToDirectFallback(benchmark.Benchmark):
201 tag = 'http_to_direct_fallback'
202 test = measurements.ChromeProxyHTTPToDirectFallback
203 page_set = pagesets.HTTPToDirectFallbackPageSet
205 @classmethod
206 def Name(cls):
207 return ('chrome_proxy_benchmark.http_to_direct_fallback.'
208 'http_to_direct_fallback')
211 class ChromeProxyReenableAfterBypass(benchmark.Benchmark):
212 tag = 'reenable_after_bypass'
213 test = measurements.ChromeProxyReenableAfterBypass
214 page_set = pagesets.ReenableAfterBypassPageSet
216 @classmethod
217 def Name(cls):
218 return 'chrome_proxy_benchmark.reenable_after_bypass.reenable_after_bypass'
221 class ChromeProxySmoke(benchmark.Benchmark):
222 tag = 'smoke'
223 test = measurements.ChromeProxySmoke
224 page_set = pagesets.SmokePageSet
226 @classmethod
227 def Name(cls):
228 return 'chrome_proxy_benchmark.smoke.smoke'