| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 import logging | 5 import logging |
| 6 import time | 6 import time |
| 7 | 7 |
| 8 from metrics import rendering_stats | 8 from metrics import rendering_stats |
| 9 from telemetry.page import page_measurement | 9 from telemetry.page import page_measurement |
| 10 from telemetry.page.perf_tests_helper import FlattenList | 10 from telemetry.page.perf_tests_helper import FlattenList |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 114 |
| 115 stats = rendering_stats.RenderingStats( | 115 stats = rendering_stats.RenderingStats( |
| 116 renderer_process, timeline.browser_process, timeline_ranges) | 116 renderer_process, timeline.browser_process, timeline_ranges) |
| 117 | 117 |
| 118 results.Add('rasterize_time', 'ms', max(FlattenList(stats.rasterize_times))) | 118 results.Add('rasterize_time', 'ms', max(FlattenList(stats.rasterize_times))) |
| 119 results.Add('record_time', 'ms', max(FlattenList(stats.record_times))) | 119 results.Add('record_time', 'ms', max(FlattenList(stats.record_times))) |
| 120 results.Add('rasterized_pixels', 'pixels', | 120 results.Add('rasterized_pixels', 'pixels', |
| 121 max(FlattenList(stats.rasterized_pixel_counts))) | 121 max(FlattenList(stats.rasterized_pixel_counts))) |
| 122 results.Add('recorded_pixels', 'pixels', | 122 results.Add('recorded_pixels', 'pixels', |
| 123 max(FlattenList(stats.recorded_pixel_counts))) | 123 max(FlattenList(stats.recorded_pixel_counts))) |
| 124 |
| 125 def CleanUpAfterPage(self, page, tab): |
| 126 if tab.browser.is_tracing_running: |
| 127 tab.browser.StopTracing() |
| OLD | NEW |