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
10 class ChromeProxyLatency(benchmark
.Benchmark
):
12 test
= measurements
.ChromeProxyLatency
13 page_set
= pagesets
.Top20PageSet
17 return 'chrome_proxy_benchmark.latency.top_20'
20 class ChromeProxyLatencyDirect(benchmark
.Benchmark
):
21 tag
= 'latency_direct'
22 test
= measurements
.ChromeProxyLatency
23 page_set
= pagesets
.Top20PageSet
27 return 'chrome_proxy_benchmark.latency_direct.top_20'
30 class ChromeProxyLatencySynthetic(ChromeProxyLatency
):
31 page_set
= pagesets
.SyntheticPageSet
35 return 'chrome_proxy_benchmark.latency.synthetic'
38 class ChromeProxyLatencySyntheticDirect(ChromeProxyLatencyDirect
):
39 page_set
= pagesets
.SyntheticPageSet
43 return 'chrome_proxy_benchmark.latency_direct.synthetic'
46 class ChromeProxyDataSaving(benchmark
.Benchmark
):
48 test
= measurements
.ChromeProxyDataSaving
49 page_set
= pagesets
.Top20PageSet
53 return 'chrome_proxy_benchmark.data_saving.top_20'
56 class ChromeProxyDataSavingDirect(benchmark
.Benchmark
):
57 tag
= 'data_saving_direct'
58 test
= measurements
.ChromeProxyDataSaving
59 page_set
= pagesets
.Top20PageSet
63 return 'chrome_proxy_benchmark.data_saving_direct.top_20'
66 class ChromeProxyDataSavingSynthetic(ChromeProxyDataSaving
):
67 page_set
= pagesets
.SyntheticPageSet
71 return 'chrome_proxy_benchmark.data_saving.synthetic'
74 class ChromeProxyDataSavingSyntheticDirect(ChromeProxyDataSavingDirect
):
75 page_set
= pagesets
.SyntheticPageSet
79 return 'chrome_proxy_benchmark.data_saving_direct.synthetic'
82 class ChromeProxyHeaderValidation(benchmark
.Benchmark
):
83 tag
= 'header_validation'
84 test
= measurements
.ChromeProxyHeaders
85 page_set
= pagesets
.Top20PageSet
89 return 'chrome_proxy_benchmark.header_validation.top_20'
92 class ChromeProxyClientVersion(benchmark
.Benchmark
):
93 tag
= 'client_version'
94 test
= measurements
.ChromeProxyClientVersion
95 page_set
= pagesets
.SyntheticPageSet
99 return 'chrome_proxy_benchmark.client_version.synthetic'
102 class ChromeProxyClientType(benchmark
.Benchmark
):
104 test
= measurements
.ChromeProxyClientType
105 page_set
= pagesets
.ClientTypePageSet
109 return 'chrome_proxy_benchmark.client_type.client_type'
112 class ChromeProxyLoFi(benchmark
.Benchmark
):
114 test
= measurements
.ChromeProxyLoFi
115 page_set
= pagesets
.LoFiPageSet
119 return 'chrome_proxy_benchmark.lo_fi.lo_fi'
122 class ChromeProxyBypass(benchmark
.Benchmark
):
124 test
= measurements
.ChromeProxyBypass
125 page_set
= pagesets
.BypassPageSet
129 return 'chrome_proxy_benchmark.bypass.bypass'
132 class ChromeProxyCorsBypass(benchmark
.Benchmark
):
134 test
= measurements
.ChromeProxyCorsBypass
135 page_set
= pagesets
.CorsBypassPageSet
139 return 'chrome_proxy_benchmark.bypass.corsbypass'
142 class ChromeProxyBlockOnce(benchmark
.Benchmark
):
144 test
= measurements
.ChromeProxyBlockOnce
145 page_set
= pagesets
.BlockOncePageSet
149 return 'chrome_proxy_benchmark.block_once.block_once'
152 @benchmark.Enabled('android')
153 # Safebrowsing is enabled for Android and iOS.
154 class ChromeProxySafeBrowsingOn(benchmark
.Benchmark
):
155 tag
= 'safebrowsing_on'
156 test
= measurements
.ChromeProxySafebrowsingOn
157 page_set
= pagesets
.SafebrowsingPageSet
161 return 'chrome_proxy_benchmark.safebrowsing_on.safebrowsing'
164 # Safebrowsing is switched off for Android Webview and all desktop platforms.
165 class ChromeProxySafeBrowsingOff(benchmark
.Benchmark
):
166 tag
= 'safebrowsing_off'
167 test
= measurements
.ChromeProxySafebrowsingOff
168 page_set
= pagesets
.SafebrowsingPageSet
172 return 'chrome_proxy_benchmark.safebrowsing_off.safebrowsing'
174 class ChromeProxyHTTPFallbackProbeURL(benchmark
.Benchmark
):
175 tag
= 'fallback_probe'
176 test
= measurements
.ChromeProxyHTTPFallbackProbeURL
177 page_set
= pagesets
.SyntheticPageSet
181 return 'chrome_proxy_benchmark.fallback_probe.synthetic'
184 class ChromeProxyHTTPFallbackViaHeader(benchmark
.Benchmark
):
185 tag
= 'fallback_viaheader'
186 test
= measurements
.ChromeProxyHTTPFallbackViaHeader
187 page_set
= pagesets
.FallbackViaHeaderPageSet
191 return 'chrome_proxy_benchmark.fallback_viaheader.fallback_viaheader'
194 class ChromeProxyHTTPToDirectFallback(benchmark
.Benchmark
):
195 tag
= 'http_to_direct_fallback'
196 test
= measurements
.ChromeProxyHTTPToDirectFallback
197 page_set
= pagesets
.HTTPToDirectFallbackPageSet
201 return ('chrome_proxy_benchmark.http_to_direct_fallback.'
202 'http_to_direct_fallback')
205 class ChromeProxyReenableAfterBypass(benchmark
.Benchmark
):
206 tag
= 'reenable_after_bypass'
207 test
= measurements
.ChromeProxyReenableAfterBypass
208 page_set
= pagesets
.ReenableAfterBypassPageSet
212 return 'chrome_proxy_benchmark.reenable_after_bypass.reenable_after_bypass'
215 class ChromeProxySmoke(benchmark
.Benchmark
):
217 test
= measurements
.ChromeProxySmoke
218 page_set
= pagesets
.SmokePageSet
222 return 'chrome_proxy_benchmark.smoke.smoke'