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

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

Issue 1176733003: [Telemetry] Change the page's file_path param to base_dir param (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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/benchmarks/sunspider.py ('k') | tools/telemetry/telemetry/page/page_set_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0287c51eae04e0f070d386a18d66aa3c5b5dda71..35afa9b362e7c3f9bffd6e431b69805980671085 100644
--- a/tools/telemetry/telemetry/page/page_set.py
+++ b/tools/telemetry/telemetry/page/page_set.py
@@ -13,20 +13,14 @@ INTERNAL_BUCKET = story.INTERNAL_BUCKET
class PageSet(story.StorySet):
- def __init__(self, file_path=None, archive_data_file='', user_agent_type=None,
+ def __init__(self, base_dir=None, archive_data_file='', user_agent_type=None,
serving_dirs=None, bucket=None):
- # The default value of file_path is location of the file that define this
- # page set instance's class.
- # TODO(aiolos): When migrating page_sets over to story_sets, make
- # sure that we are passing a valid directory path in to base_dir, and not
- # a file path like we curerntly do in some cases for file_path.
- dir_name = file_path
- if file_path and os.path.isfile(file_path):
- dir_name = os.path.dirname(file_path)
+ if base_dir and not os.path.isdir(base_dir):
+ raise ValueError('Invalid base_dir value')
super(PageSet, self).__init__(
archive_data_file=archive_data_file, cloud_storage_bucket=bucket,
- base_dir=dir_name, serving_dirs=serving_dirs)
+ base_dir=base_dir, serving_dirs=serving_dirs)
# These attributes can be set dynamically by the page set.
self.user_agent_type = user_agent_type
« no previous file with comments | « tools/perf/benchmarks/sunspider.py ('k') | tools/telemetry/telemetry/page/page_set_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698