| 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 core import perf_benchmark | 5 from core import perf_benchmark |
| 6 | 6 |
| 7 from contrib.cluster_telemetry import ct_benchmarks_util | 7 from contrib.cluster_telemetry import ct_benchmarks_util |
| 8 from contrib.cluster_telemetry import page_set | 8 from contrib.cluster_telemetry import page_set |
| 9 from contrib.cluster_telemetry import repaint_helpers | 9 from contrib.cluster_telemetry import repaint_helpers |
| 10 | 10 |
| 11 from telemetry import benchmark | 11 from telemetry import benchmark |
| 12 from telemetry.core import discover | |
| 13 from telemetry import story | 12 from telemetry import story |
| 14 | 13 |
| 14 from py_utils import discover |
| 15 |
| 15 from measurements import skpicture_printer | 16 from measurements import skpicture_printer |
| 16 | 17 |
| 17 | 18 |
| 18 def _MatchPageSetName(story_set_name, story_set_base_dir): | 19 def _MatchPageSetName(story_set_name, story_set_base_dir): |
| 19 story_sets = discover.DiscoverClasses(story_set_base_dir, story_set_base_dir, | 20 story_sets = discover.DiscoverClasses(story_set_base_dir, story_set_base_dir, |
| 20 story.StorySet).values() | 21 story.StorySet).values() |
| 21 for s in story_sets: | 22 for s in story_sets: |
| 22 if story_set_name == s.Name(): | 23 if story_set_name == s.Name(): |
| 23 return s | 24 return s |
| 24 return None | 25 return None |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 def ProcessCommandLineArgs(cls, parser, args): | 75 def ProcessCommandLineArgs(cls, parser, args): |
| 75 ct_benchmarks_util.ValidateCommandLineArgs(parser, args) | 76 ct_benchmarks_util.ValidateCommandLineArgs(parser, args) |
| 76 | 77 |
| 77 def CreatePageTest(self, options): | 78 def CreatePageTest(self, options): |
| 78 return skpicture_printer.SkpicturePrinter(options.skp_outdir) | 79 return skpicture_printer.SkpicturePrinter(options.skp_outdir) |
| 79 | 80 |
| 80 def CreateStorySet(self, options): | 81 def CreateStorySet(self, options): |
| 81 return page_set.CTPageSet( | 82 return page_set.CTPageSet( |
| 82 options.urls_list, options.user_agent, options.archive_data_file, | 83 options.urls_list, options.user_agent, options.archive_data_file, |
| 83 run_page_interaction_callback=repaint_helpers.WaitThenRepaint) | 84 run_page_interaction_callback=repaint_helpers.WaitThenRepaint) |
| OLD | NEW |