OLD | NEW |
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 from telemetry.web_perf.metrics import layout | 8 from telemetry.web_perf.metrics import layout |
9 | 9 |
10 class ThreadTimes(page_test.PageTest): | 10 class ThreadTimes(page_test.PageTest): |
11 def __init__(self, report_silk_details=False, | 11 def __init__(self, report_silk_details=False, |
12 action_name_to_run='RunSmoothness'): | 12 action_name_to_run='RunPageInteractions'): |
13 super(ThreadTimes, self).__init__(action_name_to_run=action_name_to_run) | 13 super(ThreadTimes, self).__init__(action_name_to_run=action_name_to_run) |
14 self._timeline_controller = None | 14 self._timeline_controller = None |
15 self._report_silk_details = report_silk_details | 15 self._report_silk_details = report_silk_details |
16 | 16 |
17 def WillNavigateToPage(self, page, tab): | 17 def WillNavigateToPage(self, page, tab): |
18 self._timeline_controller = timeline_controller.TimelineController() | 18 self._timeline_controller = timeline_controller.TimelineController() |
19 if self._report_silk_details: | 19 if self._report_silk_details: |
20 # We need the other traces in order to have any details to report. | 20 # We need the other traces in order to have any details to report. |
21 self._timeline_controller.trace_categories = None | 21 self._timeline_controller.trace_categories = None |
22 else: | 22 else: |
(...skipping 12 matching lines...) Expand all Loading... |
35 if self._report_silk_details: | 35 if self._report_silk_details: |
36 metric.details_to_report = timeline.ReportSilkDetails | 36 metric.details_to_report = timeline.ReportSilkDetails |
37 metric.AddResults(self._timeline_controller.model, renderer_thread, | 37 metric.AddResults(self._timeline_controller.model, renderer_thread, |
38 self._timeline_controller.smooth_records, results) | 38 self._timeline_controller.smooth_records, results) |
39 layout_metric = layout.LayoutMetric() | 39 layout_metric = layout.LayoutMetric() |
40 layout_metric.AddResults(self._timeline_controller.model, renderer_thread, | 40 layout_metric.AddResults(self._timeline_controller.model, renderer_thread, |
41 self._timeline_controller.smooth_records, results) | 41 self._timeline_controller.smooth_records, results) |
42 | 42 |
43 def CleanUpAfterPage(self, _, tab): | 43 def CleanUpAfterPage(self, _, tab): |
44 self._timeline_controller.CleanUp(tab) | 44 self._timeline_controller.CleanUp(tab) |
OLD | NEW |