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

Side by Side Diff: tools/perf/profile_creators/small_profile_extender.py

Issue 1020703002: Telemetry: Remove the class ProfileCreator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/profile_creators/small_profile_creator.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
(Empty)
1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import page_sets
6
7 from profile_creators import fast_navigation_profile_extender
8
9
10 class SmallProfileExtender(
11 fast_navigation_profile_extender.FastNavigationProfileExtender):
12 """Creates a small profile by performing 25 navigations."""
13
14 def __init__(self):
15 # Use exactly 5 tabs to generate the profile. This is because consumers of
16 # this profile will perform a session restore, and expect 5 restored tabs.
17 maximum_batch_size = 5
18 super(SmallProfileExtender, self).__init__(maximum_batch_size)
19
20 # Get the list of urls from the typical 25 page set.
21 page_set = page_sets.Typical25PageSet()
22 urls = []
23 for user_story in page_set.user_stories:
24 urls.append(user_story.url)
25 self._navigation_urls = urls
26
27 def GetUrlIterator(self):
28 """Superclass override."""
29 return iter(self._navigation_urls)
30
31 def ShouldExitAfterBatchNavigation(self):
32 """Superclass override."""
33 return False
34
OLDNEW
« no previous file with comments | « tools/perf/profile_creators/small_profile_creator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698