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

Unified Diff: tools/perf/measurements/thread_times.py

Issue 637153002: telemetry: Remove command line args from page test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Suppress pylint E1003 Created 6 years, 1 month 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/measurements/thread_times.py
diff --git a/tools/perf/measurements/thread_times.py b/tools/perf/measurements/thread_times.py
index 918a06f9bf33cf6f47e9fc3a5328160863f9589a..497d2c93151b6aba3b80bd703715ecedaa5e6f8b 100644
--- a/tools/perf/measurements/thread_times.py
+++ b/tools/perf/measurements/thread_times.py
@@ -7,18 +7,15 @@ from telemetry.core.platform import tracing_category_filter
from telemetry.page import page_test
class ThreadTimes(page_test.PageTest):
- def __init__(self):
- super(ThreadTimes, self).__init__('RunSmoothness')
+ def __init__(self, report_silk_details=False,
+ action_name_to_run='RunSmoothness'):
+ super(ThreadTimes, self).__init__(action_name_to_run=action_name_to_run)
self._timeline_controller = None
-
- @classmethod
- def AddCommandLineArgs(cls, parser):
- parser.add_option('--report-silk-details', action='store_true',
- help='Report details relevant to silk.')
+ self._report_silk_details = report_silk_details
def WillNavigateToPage(self, page, tab):
self._timeline_controller = timeline_controller.TimelineController()
- if self.options.report_silk_details:
+ if self._report_silk_details:
# We need the other traces in order to have any details to report.
self._timeline_controller.trace_categories = None
else:
@@ -36,7 +33,7 @@ class ThreadTimes(page_test.PageTest):
metric = timeline.ThreadTimesTimelineMetric()
renderer_thread = \
self._timeline_controller.model.GetRendererThreadFromTabId(tab.id)
- if self.options.report_silk_details:
+ if self._report_silk_details:
metric.details_to_report = timeline.ReportSilkDetails
metric.AddResults(self._timeline_controller.model, renderer_thread,
self._timeline_controller.smooth_records, results)

Powered by Google App Engine
This is Rietveld 408576698