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

Side by Side Diff: tools/perf/measurements/thread_times.py

Issue 641823004: telemetry: Allow page tests to be configured via constructor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Add debug output to figure out why pixel tests fail on bots. Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « tools/perf/measurements/startup.py ('k') | tools/telemetry/telemetry/benchmark.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 from measurements import timeline_controller 4 from measurements import timeline_controller
5 from metrics import timeline 5 from metrics import timeline
6 from telemetry.core.platform import tracing_category_filter 6 from telemetry.core.platform import tracing_category_filter
7 from telemetry.page import page_test 7 from telemetry.page import page_test
8 8
9 class ThreadTimes(page_test.PageTest): 9 class ThreadTimes(page_test.PageTest):
10 def __init__(self): 10 def __init__(self):
11 super(ThreadTimes, self).__init__('RunSmoothness') 11 super(ThreadTimes, self).__init__('RunSmoothness')
12 self._timeline_controller = None 12 self._timeline_controller = None
13 13
14 @classmethod 14 def AddCommandLineArgs(self, parser):
15 def AddCommandLineArgs(cls, parser):
16 parser.add_option('--report-silk-details', action='store_true', 15 parser.add_option('--report-silk-details', action='store_true',
17 help='Report details relevant to silk.') 16 help='Report details relevant to silk.')
18 17
19 def WillNavigateToPage(self, page, tab): 18 def WillNavigateToPage(self, page, tab):
20 self._timeline_controller = timeline_controller.TimelineController() 19 self._timeline_controller = timeline_controller.TimelineController()
21 if self.options.report_silk_details: 20 if self.options.report_silk_details:
22 # We need the other traces in order to have any details to report. 21 # We need the other traces in order to have any details to report.
23 self._timeline_controller.trace_categories = None 22 self._timeline_controller.trace_categories = None
24 else: 23 else:
25 self._timeline_controller.trace_categories = \ 24 self._timeline_controller.trace_categories = \
(...skipping 10 matching lines...) Expand all
36 metric = timeline.ThreadTimesTimelineMetric() 35 metric = timeline.ThreadTimesTimelineMetric()
37 renderer_thread = \ 36 renderer_thread = \
38 self._timeline_controller.model.GetRendererThreadFromTabId(tab.id) 37 self._timeline_controller.model.GetRendererThreadFromTabId(tab.id)
39 if self.options.report_silk_details: 38 if self.options.report_silk_details:
40 metric.details_to_report = timeline.ReportSilkDetails 39 metric.details_to_report = timeline.ReportSilkDetails
41 metric.AddResults(self._timeline_controller.model, renderer_thread, 40 metric.AddResults(self._timeline_controller.model, renderer_thread,
42 self._timeline_controller.smooth_records, results) 41 self._timeline_controller.smooth_records, results)
43 42
44 def CleanUpAfterPage(self, _, tab): 43 def CleanUpAfterPage(self, _, tab):
45 self._timeline_controller.CleanUp(tab) 44 self._timeline_controller.CleanUp(tab)
OLDNEW
« no previous file with comments | « tools/perf/measurements/startup.py ('k') | tools/telemetry/telemetry/benchmark.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698