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

Side by Side Diff: tools/perf/profile_creators/fast_navigation_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 | « no previous file | tools/perf/profile_creators/large_profile_creator.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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 import time 4 import time
5 5
6 from profile_creators import profile_extender
6 from telemetry.core import browser_finder 7 from telemetry.core import browser_finder
7 from telemetry.core import browser_finder_exceptions 8 from telemetry.core import browser_finder_exceptions
8 from telemetry.core import exceptions 9 from telemetry.core import exceptions
9 from telemetry.core import platform 10 from telemetry.core import platform
10 11
11 12
12 class FastNavigationProfileExtender(object): 13 class FastNavigationProfileExtender(profile_extender.ProfileExtender):
13 """Extends a Chrome profile. 14 """Extends a Chrome profile.
14 15
15 This class creates or extends an existing profile by performing a set of tab 16 This class creates or extends an existing profile by performing a set of tab
16 navigations in large batches. This is accomplished by opening a large number 17 navigations in large batches. This is accomplished by opening a large number
17 of tabs, simultaneously navigating all the tabs, and then waiting for all the 18 of tabs, simultaneously navigating all the tabs, and then waiting for all the
18 tabs to load. This provides two benefits: 19 tabs to load. This provides two benefits:
19 - Takes advantage of the high number of logical cores on modern CPUs. 20 - Takes advantage of the high number of logical cores on modern CPUs.
20 - The total time spent waiting for navigations to time out scales linearly 21 - The total time spent waiting for navigations to time out scales linearly
21 with the number of batches, but does not scale with the size of the 22 with the number of batches, but does not scale with the size of the
22 batch. 23 batch.
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 tab = self._navigation_tabs[i] 272 tab = self._navigation_tabs[i]
272 batch.append((tab, url)) 273 batch.append((tab, url))
273 274
274 queued_tabs = self._BatchNavigateTabs(batch) 275 queued_tabs = self._BatchNavigateTabs(batch)
275 self._WaitForQueuedTabsToLoad(queued_tabs) 276 self._WaitForQueuedTabsToLoad(queued_tabs)
276 277
277 self.CleanUpAfterBatchNavigation() 278 self.CleanUpAfterBatchNavigation()
278 279
279 if self.ShouldExitAfterBatchNavigation(): 280 if self.ShouldExitAfterBatchNavigation():
280 break 281 break
OLDNEW
« no previous file with comments | « no previous file | tools/perf/profile_creators/large_profile_creator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698