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

Unified Diff: tools/perf/page_sets/profile_safe_urls.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/page_sets/profile_safe_urls.py
diff --git a/tools/perf/page_sets/profile_safe_urls.py b/tools/perf/page_sets/profile_safe_urls.py
new file mode 100644
index 0000000000000000000000000000000000000000..c95906d85caeaa6aafca4adc7d32310064c73cb0
--- /dev/null
+++ b/tools/perf/page_sets/profile_safe_urls.py
@@ -0,0 +1,31 @@
+# Copyright 2015 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.
+from profile_creators import profile_safe_url_list
+from telemetry.page import page as page_module
+from telemetry.page import page_set as page_set_module
+
+
+class ProfileSafeUrlPage(page_module.Page):
+ def __init__(self, url, page_set):
+ super(ProfileSafeUrlPage, self).__init__(
+ url=url,
+ page_set = page_set,
+ credentials_path = 'data/credentials.json')
+ self.credentials = 'google'
+
+
+class ProfileSafeUrlsPageSet(page_set_module.PageSet):
+ """Safe urls used for profile generation."""
+
+ def __init__(self):
+ super(ProfileSafeUrlsPageSet, self).__init__(
+ archive_data_file='data/profile_safe_urls.json',
+ user_agent_type='desktop',
+ bucket=page_set_module.PARTNER_BUCKET)
+
+ # Only use the first 500 urls to prevent the .wpr files from getting too
+ # big.
+ safe_urls = profile_safe_url_list.GetShuffledSafeUrls()[0:500]
+ for safe_url in safe_urls:
+ self.AddUserStory(ProfileSafeUrlPage(safe_url, self))
« no previous file with comments | « tools/perf/page_sets/data/profile_safe_urls_000.wpr.sha1 ('k') | tools/perf/profile_creators/cookie_profile_extender.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698