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

Side by Side Diff: tools/perf/page_sets/infinite_scroll_cases.py

Issue 2931693002: Explicitly set names for remaining stories in v8 benchmarks (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | tools/perf/page_sets/v8_top_25.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 2017 The Chromium Authors. All rights reserved. 1 # Copyright 2017 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 import sys 5 import sys
6 6
7 from page_sets.login_helpers import facebook_login 7 from page_sets.login_helpers import facebook_login
8 from page_sets.system_health import platforms 8 from page_sets.system_health import platforms
9 from telemetry.core import discover 9 from telemetry.core import discover
10 from telemetry.page import page 10 from telemetry.page import page
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 class TwitterDesktopStory(_InfiniteScrollStory): 127 class TwitterDesktopStory(_InfiniteScrollStory):
128 NAME = 'twitter' 128 NAME = 'twitter'
129 URL = 'https://twitter.com/taylorswift13' 129 URL = 'https://twitter.com/taylorswift13'
130 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY 130 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY
131 131
132 class InfiniteScrollStorySet(story.StorySet): 132 class InfiniteScrollStorySet(story.StorySet):
133 """ Desktop story set. """ 133 """ Desktop story set. """
134 def __init__(self): 134 def __init__(self):
135 super(InfiniteScrollStorySet, self).__init__( 135 super(InfiniteScrollStorySet, self).__init__(
136 archive_data_file='data/infinite_scroll.json', 136 archive_data_file='data/infinite_scroll.json',
137 cloud_storage_bucket=story.PARTNER_BUCKET) 137 cloud_storage_bucket=story.PARTNER_BUCKET,
138 verify_names=True)
138 for story_class in _FindInfiniteScrollStoryClasses(platforms.DESKTOP): 139 for story_class in _FindInfiniteScrollStoryClasses(platforms.DESKTOP):
139 self.AddStory(story_class(self)) 140 self.AddStory(story_class(self))
140 141
141 class MobileInfiniteScrollStorySet(story.StorySet): 142 class MobileInfiniteScrollStorySet(story.StorySet):
142 """ Mobile story set. """ 143 """ Mobile story set. """
143 def __init__(self): 144 def __init__(self):
144 super(MobileInfiniteScrollStorySet, self).__init__( 145 super(MobileInfiniteScrollStorySet, self).__init__(
145 archive_data_file='data/mobile_infinite_scroll.json', 146 archive_data_file='data/mobile_infinite_scroll.json',
146 cloud_storage_bucket=story.PARTNER_BUCKET) 147 cloud_storage_bucket=story.PARTNER_BUCKET,
148 verify_names=True)
147 for story_class in _FindInfiniteScrollStoryClasses(platforms.MOBILE): 149 for story_class in _FindInfiniteScrollStoryClasses(platforms.MOBILE):
148 self.AddStory(story_class(self)) 150 self.AddStory(story_class(self))
149 151
150 def _FindInfiniteScrollStoryClasses(platform): 152 def _FindInfiniteScrollStoryClasses(platform):
151 # Sort the classes by their names so that their order is stable and 153 # Sort the classes by their names so that their order is stable and
152 # deterministic. 154 # deterministic.
153 for unused_cls_name, cls in sorted(discover.DiscoverClassesInModule( 155 for unused_cls_name, cls in sorted(discover.DiscoverClassesInModule(
154 module=sys.modules[__name__], base_class=_InfiniteScrollStory, 156 module=sys.modules[__name__], base_class=_InfiniteScrollStory,
155 index_by_class_name=True).iteritems()): 157 index_by_class_name=True).iteritems()):
156 if platform in cls.SUPPORTED_PLATFORMS: 158 if platform in cls.SUPPORTED_PLATFORMS:
157 yield cls 159 yield cls
OLDNEW
« no previous file with comments | « no previous file | tools/perf/page_sets/v8_top_25.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698