Chromium Code Reviews| 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 | 8 |
| 9 | 9 |
| 10 @benchmark.Enabled('android') | |
| 11 class ChromeProxyLatency(benchmark.Benchmark): | 10 class ChromeProxyLatency(benchmark.Benchmark): |
| 12 tag = 'latency' | 11 tag = 'latency' |
| 13 test = measurements.ChromeProxyLatency | 12 test = measurements.ChromeProxyLatency |
| 14 page_set = pagesets.Top20PageSet | 13 page_set = pagesets.Top20PageSet |
| 15 | 14 |
| 16 @classmethod | 15 @classmethod |
| 17 def Name(cls): | 16 def Name(cls): |
| 18 return 'chrome_proxy_benchmark.latency.top_20' | 17 return 'chrome_proxy_benchmark.latency.top_20' |
| 19 | 18 |
| 20 def CustomizeBrowserOptions(self, options): | 19 def CustomizeBrowserOptions(self, options): |
| 21 options.AppendExtraBrowserArgs('--enable-spdy-proxy-auth') | 20 options.AppendExtraBrowserArgs('--enable-spdy-proxy-auth') |
| 22 | 21 |
| 23 | 22 |
| 24 @benchmark.Enabled('android') | |
| 25 class ChromeProxyLatencyDirect(benchmark.Benchmark): | 23 class ChromeProxyLatencyDirect(benchmark.Benchmark): |
| 26 tag = 'latency_direct' | 24 tag = 'latency_direct' |
| 27 test = measurements.ChromeProxyLatency | 25 test = measurements.ChromeProxyLatency |
| 28 page_set = pagesets.Top20PageSet | 26 page_set = pagesets.Top20PageSet |
| 29 | 27 |
| 30 @classmethod | 28 @classmethod |
| 31 def Name(cls): | 29 def Name(cls): |
| 32 return 'chrome_proxy_benchmark.latency_direct.top_20' | 30 return 'chrome_proxy_benchmark.latency_direct.top_20' |
| 33 | 31 |
| 34 | 32 |
| 35 @benchmark.Enabled('android') | |
| 36 class ChromeProxyLatencySynthetic(ChromeProxyLatency): | 33 class ChromeProxyLatencySynthetic(ChromeProxyLatency): |
| 37 page_set = pagesets.SyntheticPageSet | 34 page_set = pagesets.SyntheticPageSet |
| 38 | 35 |
| 39 @classmethod | 36 @classmethod |
| 40 def Name(cls): | 37 def Name(cls): |
| 41 return 'chrome_proxy_benchmark.latency.synthetic' | 38 return 'chrome_proxy_benchmark.latency.synthetic' |
| 42 | 39 |
| 43 | 40 |
| 44 @benchmark.Enabled('android') | |
| 45 class ChromeProxyLatencySyntheticDirect(ChromeProxyLatencyDirect): | 41 class ChromeProxyLatencySyntheticDirect(ChromeProxyLatencyDirect): |
| 46 page_set = pagesets.SyntheticPageSet | 42 page_set = pagesets.SyntheticPageSet |
| 47 | 43 |
| 48 @classmethod | 44 @classmethod |
| 49 def Name(cls): | 45 def Name(cls): |
| 50 return 'chrome_proxy_benchmark.latency_direct.synthetic' | 46 return 'chrome_proxy_benchmark.latency_direct.synthetic' |
| 51 | 47 |
| 52 | 48 |
| 53 @benchmark.Enabled('android') | |
| 54 class ChromeProxyDataSaving(benchmark.Benchmark): | 49 class ChromeProxyDataSaving(benchmark.Benchmark): |
| 55 tag = 'data_saving' | 50 tag = 'data_saving' |
| 56 test = measurements.ChromeProxyDataSaving | 51 test = measurements.ChromeProxyDataSaving |
| 57 page_set = pagesets.Top20PageSet | 52 page_set = pagesets.Top20PageSet |
| 58 | 53 |
| 59 @classmethod | 54 @classmethod |
| 60 def Name(cls): | 55 def Name(cls): |
| 61 return 'chrome_proxy_benchmark.data_saving.top_20' | 56 return 'chrome_proxy_benchmark.data_saving.top_20' |
| 62 | 57 |
| 63 def CustomizeBrowserOptions(self, options): | 58 def CustomizeBrowserOptions(self, options): |
| 64 options.AppendExtraBrowserArgs('--enable-spdy-proxy-auth') | 59 options.AppendExtraBrowserArgs('--enable-spdy-proxy-auth') |
| 65 | 60 |
| 66 | 61 |
| 67 @benchmark.Enabled('android') | |
| 68 class ChromeProxyDataSavingDirect(benchmark.Benchmark): | 62 class ChromeProxyDataSavingDirect(benchmark.Benchmark): |
| 69 tag = 'data_saving_direct' | 63 tag = 'data_saving_direct' |
| 70 test = measurements.ChromeProxyDataSaving | 64 test = measurements.ChromeProxyDataSaving |
| 71 page_set = pagesets.Top20PageSet | 65 page_set = pagesets.Top20PageSet |
| 72 | 66 |
| 73 @classmethod | 67 @classmethod |
| 74 def Name(cls): | 68 def Name(cls): |
| 75 return 'chrome_proxy_benchmark.data_saving_direct.top_20' | 69 return 'chrome_proxy_benchmark.data_saving_direct.top_20' |
| 76 | 70 |
| 77 | 71 |
| 78 @benchmark.Enabled('android') | |
| 79 class ChromeProxyDataSavingSynthetic(ChromeProxyDataSaving): | 72 class ChromeProxyDataSavingSynthetic(ChromeProxyDataSaving): |
| 80 page_set = pagesets.SyntheticPageSet | 73 page_set = pagesets.SyntheticPageSet |
| 81 | 74 |
| 82 @classmethod | 75 @classmethod |
| 83 def Name(cls): | 76 def Name(cls): |
| 84 return 'chrome_proxy_benchmark.data_saving.synthetic' | 77 return 'chrome_proxy_benchmark.data_saving.synthetic' |
| 85 | 78 |
| 86 | 79 |
| 87 @benchmark.Enabled('android') | |
| 88 class ChromeProxyDataSavingSyntheticDirect(ChromeProxyDataSavingDirect): | 80 class ChromeProxyDataSavingSyntheticDirect(ChromeProxyDataSavingDirect): |
| 89 page_set = pagesets.SyntheticPageSet | 81 page_set = pagesets.SyntheticPageSet |
| 90 | 82 |
| 91 @classmethod | 83 @classmethod |
| 92 def Name(cls): | 84 def Name(cls): |
| 93 return 'chrome_proxy_benchmark.data_saving_direct.synthetic' | 85 return 'chrome_proxy_benchmark.data_saving_direct.synthetic' |
| 94 | 86 |
| 95 | 87 |
| 96 @benchmark.Enabled('android') | |
| 97 class ChromeProxyHeaderValidation(benchmark.Benchmark): | 88 class ChromeProxyHeaderValidation(benchmark.Benchmark): |
| 98 tag = 'header_validation' | 89 tag = 'header_validation' |
| 99 test = measurements.ChromeProxyHeaders | 90 test = measurements.ChromeProxyHeaders |
| 100 page_set = pagesets.Top20PageSet | 91 page_set = pagesets.Top20PageSet |
| 101 | 92 |
| 102 @classmethod | 93 @classmethod |
| 103 def Name(cls): | 94 def Name(cls): |
| 104 return 'chrome_proxy_benchmark.header_validation.top_20' | 95 return 'chrome_proxy_benchmark.header_validation.top_20' |
| 105 | 96 |
| 106 | 97 |
| 107 @benchmark.Enabled('android') | |
| 108 class ChromeProxyClientVersion(benchmark.Benchmark): | 98 class ChromeProxyClientVersion(benchmark.Benchmark): |
| 109 tag = 'client_version' | 99 tag = 'client_version' |
| 110 test = measurements.ChromeProxyClientVersion | 100 test = measurements.ChromeProxyClientVersion |
| 111 page_set = pagesets.SyntheticPageSet | 101 page_set = pagesets.SyntheticPageSet |
| 112 | 102 |
| 113 @classmethod | 103 @classmethod |
| 114 def Name(cls): | 104 def Name(cls): |
| 115 return 'chrome_proxy_benchmark.client_version.synthetic' | 105 return 'chrome_proxy_benchmark.client_version.synthetic' |
| 116 | 106 |
| 117 | 107 |
| 118 @benchmark.Enabled('android') | |
| 119 class ChromeProxyClientType(benchmark.Benchmark): | 108 class ChromeProxyClientType(benchmark.Benchmark): |
| 120 tag = 'client_type' | 109 tag = 'client_type' |
| 121 test = measurements.ChromeProxyClientType | 110 test = measurements.ChromeProxyClientType |
| 122 page_set = pagesets.ClientTypePageSet | 111 page_set = pagesets.ClientTypePageSet |
| 123 | 112 |
| 124 @classmethod | 113 @classmethod |
| 125 def Name(cls): | 114 def Name(cls): |
| 126 return 'chrome_proxy_benchmark.client_type.client_type' | 115 return 'chrome_proxy_benchmark.client_type.client_type' |
| 127 | 116 |
| 128 | 117 |
| 129 @benchmark.Enabled('android') | |
| 130 class ChromeProxyBypass(benchmark.Benchmark): | 118 class ChromeProxyBypass(benchmark.Benchmark): |
| 131 tag = 'bypass' | 119 tag = 'bypass' |
| 132 test = measurements.ChromeProxyBypass | 120 test = measurements.ChromeProxyBypass |
| 133 page_set = pagesets.BypassPageSet | 121 page_set = pagesets.BypassPageSet |
| 134 | 122 |
| 135 @classmethod | 123 @classmethod |
| 136 def Name(cls): | 124 def Name(cls): |
| 137 return 'chrome_proxy_benchmark.bypass.bypass' | 125 return 'chrome_proxy_benchmark.bypass.bypass' |
| 138 | 126 |
| 139 | 127 |
| 140 @benchmark.Enabled('android') | |
| 141 class ChromeProxyCorsBypass(benchmark.Benchmark): | 128 class ChromeProxyCorsBypass(benchmark.Benchmark): |
| 142 tag = 'bypass' | 129 tag = 'bypass' |
| 143 test = measurements.ChromeProxyCorsBypass | 130 test = measurements.ChromeProxyCorsBypass |
| 144 page_set = pagesets.CorsBypassPageSet | 131 page_set = pagesets.CorsBypassPageSet |
| 145 | 132 |
| 146 @classmethod | 133 @classmethod |
| 147 def Name(cls): | 134 def Name(cls): |
| 148 return 'chrome_proxy_benchmark.bypass.corsbypass' | 135 return 'chrome_proxy_benchmark.bypass.corsbypass' |
| 149 | 136 |
| 150 | 137 |
| 151 @benchmark.Enabled('android') | |
| 152 class ChromeProxyBlockOnce(benchmark.Benchmark): | 138 class ChromeProxyBlockOnce(benchmark.Benchmark): |
| 153 tag = 'block_once' | 139 tag = 'block_once' |
| 154 test = measurements.ChromeProxyBlockOnce | 140 test = measurements.ChromeProxyBlockOnce |
| 155 page_set = pagesets.BlockOncePageSet | 141 page_set = pagesets.BlockOncePageSet |
| 156 | 142 |
| 157 @classmethod | 143 @classmethod |
| 158 def Name(cls): | 144 def Name(cls): |
| 159 return 'chrome_proxy_benchmark.block_once.block_once' | 145 return 'chrome_proxy_benchmark.block_once.block_once' |
| 160 | 146 |
| 161 | 147 |
| 162 @benchmark.Enabled('android') | 148 @benchmark.Enabled('android') |
| 163 class ChromeProxySafeBrowsing(benchmark.Benchmark): | 149 # Safebrowsing is enabled for Android and iOS. |
| 164 tag = 'safebrowsing' | 150 class ChromeProxySafeBrowsingOn(benchmark.Benchmark): |
| 165 test = measurements.ChromeProxySafebrowsing | 151 tag = 'safebrowsing_on' |
| 152 test = measurements.ChromeProxySafebrowsingOn | |
| 166 page_set = pagesets.SafebrowsingPageSet | 153 page_set = pagesets.SafebrowsingPageSet |
| 167 | 154 |
| 168 @classmethod | 155 @classmethod |
| 169 def Name(cls): | 156 def Name(cls): |
| 170 return 'chrome_proxy_benchmark.safebrowsing.safebrowsing' | 157 return 'chrome_proxy_benchmark.safebrowsing.safebrowsing' |
|
sclittle
2015/01/26 18:21:38
This should be 'safebrowsing_on'
Not at Google. Contact bengr
2015/01/26 18:43:01
Done.
| |
| 171 | 158 |
| 172 | 159 |
| 173 @benchmark.Enabled('android') | 160 @benchmark.Disabled('android') |
| 161 # Safebrowsing is switched off for Android Webview and all desktop platforms. | |
| 162 class ChromeProxySafeBrowsingOff(benchmark.Benchmark): | |
| 163 tag = 'safebrowsing_off' | |
| 164 test = measurements.ChromeProxySafebrowsingOff | |
| 165 page_set = pagesets.SafebrowsingPageSet | |
|
sclittle
2015/01/26 18:21:38
This class needs that def Name(cls) method as well
Not at Google. Contact bengr
2015/01/26 18:43:01
Done.
| |
| 166 | |
| 167 | |
| 174 class ChromeProxyHTTPFallbackProbeURL(benchmark.Benchmark): | 168 class ChromeProxyHTTPFallbackProbeURL(benchmark.Benchmark): |
| 175 tag = 'fallback_probe' | 169 tag = 'fallback_probe' |
| 176 test = measurements.ChromeProxyHTTPFallbackProbeURL | 170 test = measurements.ChromeProxyHTTPFallbackProbeURL |
| 177 page_set = pagesets.SyntheticPageSet | 171 page_set = pagesets.SyntheticPageSet |
| 178 | 172 |
| 179 @classmethod | 173 @classmethod |
| 180 def Name(cls): | 174 def Name(cls): |
| 181 return 'chrome_proxy_benchmark.fallback_probe.synthetic' | 175 return 'chrome_proxy_benchmark.fallback_probe.synthetic' |
| 182 | 176 |
| 183 | 177 |
| 184 @benchmark.Enabled('android') | |
| 185 class ChromeProxyHTTPFallbackViaHeader(benchmark.Benchmark): | 178 class ChromeProxyHTTPFallbackViaHeader(benchmark.Benchmark): |
| 186 tag = 'fallback_viaheader' | 179 tag = 'fallback_viaheader' |
| 187 test = measurements.ChromeProxyHTTPFallbackViaHeader | 180 test = measurements.ChromeProxyHTTPFallbackViaHeader |
| 188 page_set = pagesets.FallbackViaHeaderPageSet | 181 page_set = pagesets.FallbackViaHeaderPageSet |
| 189 | 182 |
| 190 @classmethod | 183 @classmethod |
| 191 def Name(cls): | 184 def Name(cls): |
| 192 return 'chrome_proxy_benchmark.fallback_viaheader.fallback_viaheader' | 185 return 'chrome_proxy_benchmark.fallback_viaheader.fallback_viaheader' |
| 193 | 186 |
| 194 | 187 |
| 195 @benchmark.Enabled('android') | |
| 196 class ChromeProxyHTTPToDirectFallback(benchmark.Benchmark): | 188 class ChromeProxyHTTPToDirectFallback(benchmark.Benchmark): |
| 197 tag = 'http_to_direct_fallback' | 189 tag = 'http_to_direct_fallback' |
| 198 test = measurements.ChromeProxyHTTPToDirectFallback | 190 test = measurements.ChromeProxyHTTPToDirectFallback |
| 199 page_set = pagesets.HTTPToDirectFallbackPageSet | 191 page_set = pagesets.HTTPToDirectFallbackPageSet |
| 200 | 192 |
| 201 @classmethod | 193 @classmethod |
| 202 def Name(cls): | 194 def Name(cls): |
| 203 return ('chrome_proxy_benchmark.http_to_direct_fallback.' | 195 return ('chrome_proxy_benchmark.http_to_direct_fallback.' |
| 204 'http_to_direct_fallback') | 196 'http_to_direct_fallback') |
| 205 | 197 |
| 206 | 198 |
| 207 @benchmark.Enabled('android') | |
| 208 class ChromeProxyReenableAfterBypass(benchmark.Benchmark): | 199 class ChromeProxyReenableAfterBypass(benchmark.Benchmark): |
| 209 tag = 'reenable_after_bypass' | 200 tag = 'reenable_after_bypass' |
| 210 test = measurements.ChromeProxyReenableAfterBypass | 201 test = measurements.ChromeProxyReenableAfterBypass |
| 211 page_set = pagesets.ReenableAfterBypassPageSet | 202 page_set = pagesets.ReenableAfterBypassPageSet |
| 212 | 203 |
| 213 @classmethod | 204 @classmethod |
| 214 def Name(cls): | 205 def Name(cls): |
| 215 return 'chrome_proxy_benchmark.reenable_after_bypass.reenable_after_bypass' | 206 return 'chrome_proxy_benchmark.reenable_after_bypass.reenable_after_bypass' |
| 216 | 207 |
| 217 | 208 |
| 218 @benchmark.Enabled('android') | |
| 219 class ChromeProxySmoke(benchmark.Benchmark): | 209 class ChromeProxySmoke(benchmark.Benchmark): |
| 220 tag = 'smoke' | 210 tag = 'smoke' |
| 221 test = measurements.ChromeProxySmoke | 211 test = measurements.ChromeProxySmoke |
| 222 page_set = pagesets.SmokePageSet | 212 page_set = pagesets.SmokePageSet |
| 223 | 213 |
| 224 @classmethod | 214 @classmethod |
| 225 def Name(cls): | 215 def Name(cls): |
| 226 return 'chrome_proxy_benchmark.smoke.smoke' | 216 return 'chrome_proxy_benchmark.smoke.smoke' |
| OLD | NEW |