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

Unified Diff: tools/telemetry/telemetry/page/page_set.py

Issue 180873008: Add support for python pageset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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/telemetry/telemetry/page/page_set.py
diff --git a/tools/telemetry/telemetry/page/page_set.py b/tools/telemetry/telemetry/page/page_set.py
index f97cb0d69cf900979e158d5dc2fcf0105a6dad92..0841d9b0c7ef90befbeff4b549b2c4254cb231d6 100644
--- a/tools/telemetry/telemetry/page/page_set.py
+++ b/tools/telemetry/telemetry/page/page_set.py
@@ -86,6 +86,7 @@ class PageSet(object):
@classmethod
def FromFile(cls, file_path):
+ assert file_path.endswith('.json'), 'This pageset only supports json file'
with open(file_path, 'r') as f:
contents = f.read()
data = json.loads(contents)
@@ -96,18 +97,16 @@ class PageSet(object):
return cls(file_path, data)
@property
+ def is_python_pageset(self):
+ return False
+
+ @property
def _base_dir(self):
if os.path.isfile(self.file_path):
return os.path.dirname(self.file_path)
else:
return self.file_path
- def ContainsOnlyFileURLs(self):
- for page in self.pages:
- if not page.is_file:
- return False
- return True
-
def ReorderPageSet(self, results_file):
"""Reorders this page set based on the results of a past run."""
page_set_dict = {}

Powered by Google App Engine
This is Rietveld 408576698