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

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

Issue 1217813005: [Telemetry] Modify CreatePageSet to CreateStorySet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Ethan's comments Created 5 years, 5 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 | « content/test/gpu/gpu_tests/webgl_robustness.py ('k') | tools/perf/benchmarks/blink_perf.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 """Run the first page of one benchmark for every module. 5 """Run the first page of one benchmark for every module.
6 6
7 Only benchmarks that have a composable measurement are included. 7 Only benchmarks that have a composable measurement are included.
8 Ideally this test would be comprehensive, however, running one page 8 Ideally this test would be comprehensive, however, running one page
9 of every benchmark would run impractically long. 9 of every benchmark would run impractically long.
10 """ 10 """
(...skipping 28 matching lines...) Expand all
39 # failing or flaky benchmark would disable a much wider swath of coverage 39 # failing or flaky benchmark would disable a much wider swath of coverage
40 # than is usally intended. Instead, if a particular benchmark is failing, 40 # than is usally intended. Instead, if a particular benchmark is failing,
41 # disable it in tools/perf/benchmarks/*. 41 # disable it in tools/perf/benchmarks/*.
42 @benchmark_module.Disabled('chromeos') # crbug.com/351114 42 @benchmark_module.Disabled('chromeos') # crbug.com/351114
43 def BenchmarkSmokeTest(self): 43 def BenchmarkSmokeTest(self):
44 # Only measure a single page so that this test cycles reasonably quickly. 44 # Only measure a single page so that this test cycles reasonably quickly.
45 benchmark.options['pageset_repeat'] = 1 45 benchmark.options['pageset_repeat'] = 1
46 benchmark.options['page_repeat'] = 1 46 benchmark.options['page_repeat'] = 1
47 47
48 class SinglePageBenchmark(benchmark): # pylint: disable=W0232 48 class SinglePageBenchmark(benchmark): # pylint: disable=W0232
49 def CreatePageSet(self, options): 49 def CreateStorySet(self, options):
50 # pylint: disable=E1002 50 # pylint: disable=E1002
51 ps = super(SinglePageBenchmark, self).CreatePageSet(options) 51 ps = super(SinglePageBenchmark, self).CreateStorySet(options)
52 for p in ps.pages: 52 for p in ps.pages:
53 p.skip_waits = True 53 p.skip_waits = True
54 ps.user_stories = [p] 54 ps.user_stories = [p]
55 break 55 break
56 return ps 56 return ps
57 57
58 # Set the benchmark's default arguments. 58 # Set the benchmark's default arguments.
59 options = options_for_unittests.GetCopy() 59 options = options_for_unittests.GetCopy()
60 options.output_format = 'none' 60 options.output_format = 'none'
61 options.suppress_gtest_report = True 61 options.suppress_gtest_report = True
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 152
153 # Disable some tests on android platform only. 153 # Disable some tests on android platform only.
154 if sys.modules[benchmark.__module__] in _ANDROID_BLACK_LIST_MODULES: 154 if sys.modules[benchmark.__module__] in _ANDROID_BLACK_LIST_MODULES:
155 method._disabled_strings.append('android') 155 method._disabled_strings.append('android')
156 156
157 setattr(BenchmarkSmokeTest, benchmark.Name(), method) 157 setattr(BenchmarkSmokeTest, benchmark.Name(), method)
158 158
159 suite.addTest(BenchmarkSmokeTest(benchmark.Name())) 159 suite.addTest(BenchmarkSmokeTest(benchmark.Name()))
160 160
161 return suite 161 return suite
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/webgl_robustness.py ('k') | tools/perf/benchmarks/blink_perf.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698