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 | 4 |
5 from metrics import smoothness | 5 from metrics import smoothness |
6 from metrics import timeline_interaction_record as tir_module | 6 from metrics import timeline_interaction_record as tir_module |
7 from telemetry.core.timeline.model import TimelineModel | 7 from telemetry.core.timeline.model import TimelineModel |
8 from telemetry.page import page_measurement | 8 from telemetry.page import page_measurement |
9 | 9 |
10 import telemetry.core.timeline.bounds as timeline_bounds | 10 import telemetry.core.timeline.bounds as timeline_bounds |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
56 smoothness_metric = smoothness.SmoothnessMetric() | 56 smoothness_metric = smoothness.SmoothnessMetric() |
57 smoothness_metric.AddResults(self._timeline_model, | 57 smoothness_metric.AddResults(self._timeline_model, |
58 renderer_thread, | 58 renderer_thread, |
59 interaction_record, | 59 interaction_record, |
60 results) | 60 results) |
61 if tab.browser.platform.IsRawDisplayFrameRateSupported(): | 61 if tab.browser.platform.IsRawDisplayFrameRateSupported(): |
62 for r in tab.browser.platform.GetRawDisplayFrameRateMeasurements(): | 62 for r in tab.browser.platform.GetRawDisplayFrameRateMeasurements(): |
63 if r.value is None: | 63 if r.value is None: |
64 raise MissingDisplayFrameRateError(r.name) | 64 raise MissingDisplayFrameRateError(r.name) |
65 results.Add(r.name, r.unit, r.value) | 65 results.Add(r.name, r.unit, r.value) |
66 | |
67 def CleanUp(self, tab): | |
ernstm
2014/03/25 00:00:53
Can you please add:
if tab.browser.platform.IsRawD
| |
68 if tab.browser.is_tracing_running: | |
69 tab.browser.StopTracing() | |
OLD | NEW |