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

Unified Diff: tools/perf/profile_creators/profile_safe_url_list.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
« no previous file with comments | « tools/perf/profile_creators/profile_safe_url_list.json ('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/profile_safe_url_list.py
diff --git a/tools/perf/profile_creators/profile_safe_url_list.py b/tools/perf/profile_creators/profile_safe_url_list.py
index 73f0e7b36b9a8bda2e9905be919fc4191b20307b..3bb6cf3d4576065a018a144ac4fa820e0bb72822 100644
--- a/tools/perf/profile_creators/profile_safe_url_list.py
+++ b/tools/perf/profile_creators/profile_safe_url_list.py
@@ -7,16 +7,18 @@ import random
def GetShuffledSafeUrls():
- """Returns a deterministic shuffling of safe urls. The profile generators
- access the urls in order, and the urls are grouped by domain. The shuffling
- reduces the load on external servers."""
+ """Returns a deterministic shuffling of safe urls.
+
+ The profile generators access the urls in order, and the urls are grouped by
+ domain. The shuffling reduces the load on external servers.
+ """
random.seed(0)
- url_list_copy = list(_GetSafeUrls())
+ url_list_copy = list(GetSafeUrls())
random.shuffle(url_list_copy)
return url_list_copy
-def _GetSafeUrls():
+def GetSafeUrls():
"""Returns a list of safe urls by loading them from a pre-generated file."""
safe_url_dir = os.path.dirname(os.path.realpath(__file__))
safe_url_path = os.path.join(safe_url_dir, "profile_safe_url_list.json")
« no previous file with comments | « tools/perf/profile_creators/profile_safe_url_list.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698