OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 sys | 5 import sys |
6 import time | 6 import time |
7 | 7 |
8 from telemetry.core.util import TimeoutException | 8 from telemetry.core.util import TimeoutException |
9 from telemetry.page import page_test | 9 from telemetry.page import page_test |
10 from telemetry.value import scalar | 10 from telemetry.value import scalar |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 results.current_page, 'pixels_rasterized', 'pixels', pixels_rasterized)) | 103 results.current_page, 'pixels_rasterized', 'pixels', pixels_rasterized)) |
104 results.AddValue(scalar.ScalarValue( | 104 results.AddValue(scalar.ScalarValue( |
105 results.current_page, 'rasterize_time', 'ms', rasterize_time)) | 105 results.current_page, 'rasterize_time', 'ms', rasterize_time)) |
106 | 106 |
107 # TODO(skyostil): Remove this temporary workaround when reference build has | 107 # TODO(skyostil): Remove this temporary workaround when reference build has |
108 # been updated to branch 1931 or later. | 108 # been updated to branch 1931 or later. |
109 if ((self._chrome_branch_number and self._chrome_branch_number >= 1931) or | 109 if ((self._chrome_branch_number and self._chrome_branch_number >= 1931) or |
110 sys.platform == 'android'): | 110 sys.platform == 'android'): |
111 record_time_sk_null_canvas = data['record_time_sk_null_canvas_ms'] | 111 record_time_sk_null_canvas = data['record_time_sk_null_canvas_ms'] |
112 record_time_painting_disabled = data['record_time_painting_disabled_ms'] | 112 record_time_painting_disabled = data['record_time_painting_disabled_ms'] |
113 record_time_skrecord = data['record_time_skrecord_ms'] | |
114 results.AddValue(scalar.ScalarValue( | 113 results.AddValue(scalar.ScalarValue( |
115 results.current_page, 'record_time_sk_null_canvas', 'ms', | 114 results.current_page, 'record_time_sk_null_canvas', 'ms', |
116 record_time_sk_null_canvas)) | 115 record_time_sk_null_canvas)) |
117 results.AddValue(scalar.ScalarValue( | 116 results.AddValue(scalar.ScalarValue( |
118 results.current_page, 'record_time_painting_disabled', 'ms', | 117 results.current_page, 'record_time_painting_disabled', 'ms', |
119 record_time_painting_disabled)) | 118 record_time_painting_disabled)) |
120 results.AddValue(scalar.ScalarValue( | |
121 results.current_page, 'record_time_skrecord', 'ms', | |
122 record_time_skrecord)) | |
123 | 119 |
124 if self.options.report_detailed_results: | 120 if self.options.report_detailed_results: |
125 pixels_rasterized_with_non_solid_color = \ | 121 pixels_rasterized_with_non_solid_color = \ |
126 data['pixels_rasterized_with_non_solid_color'] | 122 data['pixels_rasterized_with_non_solid_color'] |
127 pixels_rasterized_as_opaque = \ | 123 pixels_rasterized_as_opaque = \ |
128 data['pixels_rasterized_as_opaque'] | 124 data['pixels_rasterized_as_opaque'] |
129 total_layers = data['total_layers'] | 125 total_layers = data['total_layers'] |
130 total_picture_layers = data['total_picture_layers'] | 126 total_picture_layers = data['total_picture_layers'] |
131 total_picture_layers_with_no_content = \ | 127 total_picture_layers_with_no_content = \ |
132 data['total_picture_layers_with_no_content'] | 128 data['total_picture_layers_with_no_content'] |
(...skipping 10 matching lines...) Expand all Loading... |
143 results.current_page, 'total_layers', 'count', total_layers)) | 139 results.current_page, 'total_layers', 'count', total_layers)) |
144 results.AddValue(scalar.ScalarValue( | 140 results.AddValue(scalar.ScalarValue( |
145 results.current_page, 'total_picture_layers', 'count', | 141 results.current_page, 'total_picture_layers', 'count', |
146 total_picture_layers)) | 142 total_picture_layers)) |
147 results.AddValue(scalar.ScalarValue( | 143 results.AddValue(scalar.ScalarValue( |
148 results.current_page, 'total_picture_layers_with_no_content', 'count', | 144 results.current_page, 'total_picture_layers_with_no_content', 'count', |
149 total_picture_layers_with_no_content)) | 145 total_picture_layers_with_no_content)) |
150 results.AddValue(scalar.ScalarValue( | 146 results.AddValue(scalar.ScalarValue( |
151 results.current_page, 'total_picture_layers_off_screen', 'count', | 147 results.current_page, 'total_picture_layers_off_screen', 'count', |
152 total_picture_layers_off_screen)) | 148 total_picture_layers_off_screen)) |
OLD | NEW |