| 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 """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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 # Only measure a single page so that this test cycles reasonably quickly. | 47 # Only measure a single page so that this test cycles reasonably quickly. |
| 48 benchmark.options['pageset_repeat'] = 1 | 48 benchmark.options['pageset_repeat'] = 1 |
| 49 benchmark.options['page_repeat'] = 1 | 49 benchmark.options['page_repeat'] = 1 |
| 50 | 50 |
| 51 class SinglePageBenchmark(benchmark): # pylint: disable=no-init | 51 class SinglePageBenchmark(benchmark): # pylint: disable=no-init |
| 52 | 52 |
| 53 def CreateStorySet(self, options): | 53 def CreateStorySet(self, options): |
| 54 # pylint: disable=super-on-old-class | 54 # pylint: disable=super-on-old-class |
| 55 story_set = super(SinglePageBenchmark, self).CreateStorySet(options) | 55 story_set = super(SinglePageBenchmark, self).CreateStorySet(options) |
| 56 for story in story_set.stories: | 56 for story in story_set.stories: |
| 57 story.skip_waits = True | |
| 58 story_set.stories = [story] | 57 story_set.stories = [story] |
| 59 break | 58 break |
| 60 return story_set | 59 return story_set |
| 61 | 60 |
| 62 # Set the benchmark's default arguments. | 61 # Set the benchmark's default arguments. |
| 63 options = options_for_unittests.GetCopy() | 62 options = options_for_unittests.GetCopy() |
| 64 options.output_format = 'none' | 63 options.output_format = 'none' |
| 65 parser = options.CreateParser() | 64 parser = options.CreateParser() |
| 66 | 65 |
| 67 benchmark.AddCommandLineArgs(parser) | 66 benchmark.AddCommandLineArgs(parser) |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 | 155 |
| 157 # TODO(bashi): Remove once crrev.com/1266833004 is landed. | 156 # TODO(bashi): Remove once crrev.com/1266833004 is landed. |
| 158 if benchmark.Name() == 'memory.blink_memory_mobile': | 157 if benchmark.Name() == 'memory.blink_memory_mobile': |
| 159 method._disabled_strings.add('android') | 158 method._disabled_strings.add('android') |
| 160 | 159 |
| 161 setattr(BenchmarkSmokeTest, benchmark.Name(), method) | 160 setattr(BenchmarkSmokeTest, benchmark.Name(), method) |
| 162 | 161 |
| 163 suite.addTest(BenchmarkSmokeTest(benchmark.Name())) | 162 suite.addTest(BenchmarkSmokeTest(benchmark.Name())) |
| 164 | 163 |
| 165 return suite | 164 return suite |
| OLD | NEW |