Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(352)

Side by Side Diff: tools/chrome_proxy/integration_tests/chrome_proxy_benchmark.py

Issue 1098253004: Move top_20 tests to a separate suite (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert to old naming scheme for live/integration tests Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
6 from integration_tests import pagesets as pagesets
sclittle 2015/04/30 00:07:58 nit: I think you can leave off the "as pagesets" a
bustamante 2015/04/30 20:30:40 Done. I reverted the directory back to chrome_pro
5 from integration_tests import chrome_proxy_measurements as measurements 7 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 import benchmark
8 from telemetry.core.backends.chrome import android_browser_finder 9 from telemetry.core.backends.chrome import android_browser_finder
9 10
10 11
11 ANDROID_CHROME_BROWSERS = [ 12 ANDROID_CHROME_BROWSERS = [
12 browser for browser in android_browser_finder.CHROME_PACKAGE_NAMES 13 browser for browser in android_browser_finder.CHROME_PACKAGE_NAMES
13 if 'webview' not in browser] 14 if 'webview' not in browser]
14 15
15 class ChromeProxyLatency(benchmark.Benchmark):
16 tag = 'latency'
17 test = measurements.ChromeProxyLatency
18 page_set = pagesets.Top20PageSet
19
20 @classmethod
21 def Name(cls):
22 return 'chrome_proxy_benchmark.latency.top_20'
23
24
25 class ChromeProxyLatencyDirect(benchmark.Benchmark):
26 tag = 'latency_direct'
27 test = measurements.ChromeProxyLatency
28 page_set = pagesets.Top20PageSet
29
30 @classmethod
31 def Name(cls):
32 return 'chrome_proxy_benchmark.latency_direct.top_20'
33
34
35 class ChromeProxyLatencySynthetic(ChromeProxyLatency):
36 page_set = pagesets.SyntheticPageSet
37
38 @classmethod
39 def Name(cls):
40 return 'chrome_proxy_benchmark.latency.synthetic'
41
42
43 class ChromeProxyLatencySyntheticDirect(ChromeProxyLatencyDirect):
44 page_set = pagesets.SyntheticPageSet
45
46 @classmethod
47 def Name(cls):
48 return 'chrome_proxy_benchmark.latency_direct.synthetic'
49
50
51 class ChromeProxyDataSaving(benchmark.Benchmark):
52 tag = 'data_saving'
53 test = measurements.ChromeProxyDataSaving
54 page_set = pagesets.Top20PageSet
55
56 @classmethod
57 def Name(cls):
58 return 'chrome_proxy_benchmark.data_saving.top_20'
59
60
61 class ChromeProxyDataSavingDirect(benchmark.Benchmark):
62 tag = 'data_saving_direct'
63 test = measurements.ChromeProxyDataSaving
64 page_set = pagesets.Top20PageSet
65
66 @classmethod
67 def Name(cls):
68 return 'chrome_proxy_benchmark.data_saving_direct.top_20'
69
70
71 class ChromeProxyDataSavingSynthetic(ChromeProxyDataSaving):
72 page_set = pagesets.SyntheticPageSet
73
74 @classmethod
75 def Name(cls):
76 return 'chrome_proxy_benchmark.data_saving.synthetic'
77
78
79 class ChromeProxyDataSavingSyntheticDirect(ChromeProxyDataSavingDirect):
80 page_set = pagesets.SyntheticPageSet
81
82 @classmethod
83 def Name(cls):
84 return 'chrome_proxy_benchmark.data_saving_direct.synthetic'
85
86
87 class ChromeProxyHeaderValidation(benchmark.Benchmark):
88 tag = 'header_validation'
89 test = measurements.ChromeProxyHeaders
90 page_set = pagesets.Top20PageSet
91
92 @classmethod
93 def Name(cls):
94 return 'chrome_proxy_benchmark.header_validation.top_20'
95
96
97 class ChromeProxyBenchmark(benchmark.Benchmark):
98 @classmethod
99 def AddCommandLineArgs(cls, parser):
100 parser.add_option(
101 '--extra-chrome-proxy-via-header',
102 type='string', dest="extra_header",
103 help='Adds an expected Via header for the Chrome-Proxy tests.')
104
105 @classmethod
106 def ProcessCommandLineArgs(cls, parser, args):
107 if args.extra_header:
108 measurements.ChromeProxyValidation.extra_via_header = args.extra_header
109
110 16
111 class ChromeProxyClientVersion(ChromeProxyBenchmark): 17 class ChromeProxyClientVersion(ChromeProxyBenchmark):
112 tag = 'client_version' 18 tag = 'client_version'
113 test = measurements.ChromeProxyClientVersion 19 test = measurements.ChromeProxyClientVersion
114 page_set = pagesets.SyntheticPageSet 20 page_set = pagesets.SyntheticPageSet
115 21
116 @classmethod 22 @classmethod
117 def Name(cls): 23 def Name(cls):
118 return 'chrome_proxy_benchmark.client_version.synthetic' 24 return 'chrome_proxy_benchmark.client_version.synthetic'
119 25
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 149
244 150
245 class ChromeProxySmoke(ChromeProxyBenchmark): 151 class ChromeProxySmoke(ChromeProxyBenchmark):
246 tag = 'smoke' 152 tag = 'smoke'
247 test = measurements.ChromeProxySmoke 153 test = measurements.ChromeProxySmoke
248 page_set = pagesets.SmokePageSet 154 page_set = pagesets.SmokePageSet
249 155
250 @classmethod 156 @classmethod
251 def Name(cls): 157 def Name(cls):
252 return 'chrome_proxy_benchmark.smoke.smoke' 158 return 'chrome_proxy_benchmark.smoke.smoke'
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698