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

Side by Side Diff: tools/perf/benchmarks/system_health_smoke_test.py

Issue 2705863002: [tools/perf] Remove page_repeat option from smoke tests (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « tools/perf/benchmarks/benchmark_smoke_unittest.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 """Run all system health stories used by system health benchmarks. 5 """Run all system health stories used by system health benchmarks.
6 6
7 Only memory benchmarks are used when running these stories to make the total 7 Only memory benchmarks are used when running these stories to make the total
8 cycle time manageable. Other system health benchmarks should be using the same 8 cycle time manageable. Other system health benchmarks should be using the same
9 stories as memory ones, only with fewer actions (no memory dumping). 9 stories as memory ones, only with fewer actions (no memory dumping).
10 """ 10 """
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 # core. 112 # core.
113 benchmark_class.AddCommandLineArgs(parser) 113 benchmark_class.AddCommandLineArgs(parser)
114 benchmark_module.AddCommandLineArgs(parser) 114 benchmark_module.AddCommandLineArgs(parser)
115 benchmark_class.SetArgumentDefaults(parser) 115 benchmark_class.SetArgumentDefaults(parser)
116 options.MergeDefaultValues(parser.get_default_values()) 116 options.MergeDefaultValues(parser.get_default_values())
117 117
118 benchmark_class.ProcessCommandLineArgs(None, options) 118 benchmark_class.ProcessCommandLineArgs(None, options)
119 benchmark_module.ProcessCommandLineArgs(None, options) 119 benchmark_module.ProcessCommandLineArgs(None, options)
120 # Only measure a single story so that this test cycles reasonably quickly. 120 # Only measure a single story so that this test cycles reasonably quickly.
121 options.pageset_repeat = 1 121 options.pageset_repeat = 1
122 options.page_repeat = 1 122
123 # Enable browser logging in the smoke test only. Hopefully, this will detect 123 # Enable browser logging in the smoke test only. Hopefully, this will detect
124 # all crashes and hence remove the need to enable logging in actual perf 124 # all crashes and hence remove the need to enable logging in actual perf
125 # benchmarks. 125 # benchmarks.
126 options.browser_options.logging_verbosity = 'non-verbose' 126 options.browser_options.logging_verbosity = 'non-verbose'
127 return options 127 return options
128 128
129 129
130 def load_tests(loader, standard_tests, pattern): 130 def load_tests(loader, standard_tests, pattern):
131 del loader, standard_tests, pattern # unused 131 del loader, standard_tests, pattern # unused
132 suite = progress_reporter.TestSuite() 132 suite = progress_reporter.TestSuite()
133 benchmark_classes = GetSystemHealthBenchmarksToSmokeTest() 133 benchmark_classes = GetSystemHealthBenchmarksToSmokeTest()
134 assert benchmark_classes, 'This list should never be empty' 134 assert benchmark_classes, 'This list should never be empty'
135 for benchmark_class in benchmark_classes: 135 for benchmark_class in benchmark_classes:
136 136
137 # HACK: these options should be derived from options_for_unittests which are 137 # HACK: these options should be derived from options_for_unittests which are
138 # the resolved options from run_tests' arguments. However, options is only 138 # the resolved options from run_tests' arguments. However, options is only
139 # parsed during test time which happens after load_tests are called. 139 # parsed during test time which happens after load_tests are called.
140 # Since none of our system health benchmarks creates stories based on 140 # Since none of our system health benchmarks creates stories based on
141 # command line options, it should be ok to pass options=None to 141 # command line options, it should be ok to pass options=None to
142 # CreateStorySet. 142 # CreateStorySet.
143 for story_to_smoke_test in ( 143 for story_to_smoke_test in (
144 benchmark_class().CreateStorySet(options=None).stories): 144 benchmark_class().CreateStorySet(options=None).stories):
145 suite.addTest( 145 suite.addTest(
146 _GenerateSmokeTestCase(benchmark_class, story_to_smoke_test)) 146 _GenerateSmokeTestCase(benchmark_class, story_to_smoke_test))
147 147
148 return suite 148 return suite
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/benchmark_smoke_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698