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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/perf/profile_creators/small_profile_creator.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/profile_creators/small_profile_extender.py
diff --git a/tools/perf/profile_creators/small_profile_extender.py b/tools/perf/profile_creators/small_profile_extender.py
new file mode 100644
index 0000000000000000000000000000000000000000..8e65075d8192272a00a548c6288a78b820df7565
--- /dev/null
+++ b/tools/perf/profile_creators/small_profile_extender.py
@@ -0,0 +1,34 @@
+# Copyright 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import page_sets
+
+from profile_creators import fast_navigation_profile_extender
+
+
+class SmallProfileExtender(
+ fast_navigation_profile_extender.FastNavigationProfileExtender):
+ """Creates a small profile by performing 25 navigations."""
+
+ def __init__(self):
+ # Use exactly 5 tabs to generate the profile. This is because consumers of
+ # this profile will perform a session restore, and expect 5 restored tabs.
+ maximum_batch_size = 5
+ super(SmallProfileExtender, self).__init__(maximum_batch_size)
+
+ # Get the list of urls from the typical 25 page set.
+ page_set = page_sets.Typical25PageSet()
+ urls = []
+ for user_story in page_set.user_stories:
+ urls.append(user_story.url)
+ self._navigation_urls = urls
+
+ def GetUrlIterator(self):
+ """Superclass override."""
+ return iter(self._navigation_urls)
+
+ def ShouldExitAfterBatchNavigation(self):
+ """Superclass override."""
+ return False
+
« 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