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

Unified Diff: tools/perf/profile_creators/cookie_profile_extender.py

Issue 1070053004: Telemetry: Add WPR data for large profiles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update profile safe url list. Created 5 years, 8 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
Index: tools/perf/profile_creators/cookie_profile_extender.py
diff --git a/tools/perf/profile_creators/cookie_profile_extender.py b/tools/perf/profile_creators/cookie_profile_extender.py
index 854e96978b70cc7b73be457a1d98d9b29c79a61c..b98af386f914a4939666ed4b839ad823232e7bf0 100644
--- a/tools/perf/profile_creators/cookie_profile_extender.py
+++ b/tools/perf/profile_creators/cookie_profile_extender.py
@@ -5,13 +5,14 @@ import multiprocessing
import os
import sqlite3
+import page_sets
+
from profile_creators import fast_navigation_profile_extender
from profile_creators import profile_safe_url_list
class CookieProfileExtender(
fast_navigation_profile_extender.FastNavigationProfileExtender):
- """This extender performs a large number of navigations (up to 500), with the
- goal of filling out the cookie database.
+ """This extender fills in the cookie database.
By default, Chrome purges the cookie DB down to 3300 cookies. However, it
won't purge cookies accessed in the last month. This means the extender needs
@@ -28,9 +29,12 @@ class CookieProfileExtender(
# A list of urls that have not yet been navigated to. This list will shrink
# over time. Each navigation will add a diminishing number of new cookies,
- # since there's a high probability that the cookie is already present. If
- # the cookie DB isn't full by 500 navigations, just give up.
- self._navigation_urls = profile_safe_url_list.GetShuffledSafeUrls()[0:500]
+ # since there's a high probability that the cookie is already present.
+ self._page_set = page_sets.ProfileSafeUrlsPageSet()
+ urls = []
+ for user_story in self._page_set.user_stories:
+ urls.append(user_story.url)
+ self._navigation_urls = urls
def GetUrlIterator(self):
"""Superclass override."""
@@ -40,6 +44,14 @@ class CookieProfileExtender(
"""Superclass override."""
return self._IsCookieDBFull()
+ def WebPageReplayArchivePath(self):
+ return self._page_set.WprFilePathForUserStory(
+ self._page_set.user_stories[0])
+
+ def FetchWebPageReplayArchives(self):
+ """Superclass override."""
+ self._page_set.wpr_archive_info.DownloadArchivesIfNeeded()
+
@staticmethod
def _CookieCountInDB(db_path):
"""The number of cookies in the db at |db_path|."""
« no previous file with comments | « tools/perf/page_sets/profile_safe_urls.py ('k') | tools/perf/profile_creators/profile_safe_url_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698