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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 results.current_page, 'pixels_recorded', 'pixels', pixels_recorded)) | 76 results.current_page, 'pixels_recorded', 'pixels', pixels_recorded)) |
77 results.AddValue(scalar.ScalarValue( | 77 results.AddValue(scalar.ScalarValue( |
78 results.current_page, 'pixels_rasterized', 'pixels', pixels_rasterized)) | 78 results.current_page, 'pixels_rasterized', 'pixels', pixels_rasterized)) |
79 results.AddValue(scalar.ScalarValue( | 79 results.AddValue(scalar.ScalarValue( |
80 results.current_page, 'rasterize_time', 'ms', rasterize_time)) | 80 results.current_page, 'rasterize_time', 'ms', rasterize_time)) |
81 results.AddValue(scalar.ScalarValue( | 81 results.AddValue(scalar.ScalarValue( |
82 results.current_page, 'viewport_picture_size', 'bytes', | 82 results.current_page, 'viewport_picture_size', 'bytes', |
83 picture_memory_usage)) | 83 picture_memory_usage)) |
84 results.AddValue(scalar.ScalarValue( | 84 results.AddValue(scalar.ScalarValue( |
85 results.current_page, 'record_time', 'ms', record_time)) | 85 results.current_page, 'record_time', 'ms', record_time)) |
| 86 |
86 record_time_sk_null_canvas = data['record_time_sk_null_canvas_ms'] | 87 record_time_sk_null_canvas = data['record_time_sk_null_canvas_ms'] |
87 record_time_painting_disabled = data['record_time_painting_disabled_ms'] | 88 record_time_painting_disabled = data['record_time_painting_disabled_ms'] |
| 89 # TODO(schenney): Remove this workaround when reference builds get past |
| 90 # the change that adds this comment. |
| 91 if ('record_time_caching_disabled_ms' in data): |
| 92 record_time_caching_disabled = data['record_time_caching_disabled_ms'] |
| 93 else: |
| 94 record_time_caching_disabled = 0 |
88 results.AddValue(scalar.ScalarValue( | 95 results.AddValue(scalar.ScalarValue( |
89 results.current_page, 'record_time_sk_null_canvas', 'ms', | 96 results.current_page, 'record_time_sk_null_canvas', 'ms', |
90 record_time_sk_null_canvas)) | 97 record_time_sk_null_canvas)) |
91 results.AddValue(scalar.ScalarValue( | 98 results.AddValue(scalar.ScalarValue( |
92 results.current_page, 'record_time_painting_disabled', 'ms', | 99 results.current_page, 'record_time_painting_disabled', 'ms', |
93 record_time_painting_disabled)) | 100 record_time_painting_disabled)) |
| 101 results.AddValue(scalar.ScalarValue( |
| 102 results.current_page, 'record_time_caching_disabled', 'ms', |
| 103 record_time_caching_disabled)) |
94 | 104 |
95 if self._report_detailed_results: | 105 if self._report_detailed_results: |
96 pixels_rasterized_with_non_solid_color = \ | 106 pixels_rasterized_with_non_solid_color = \ |
97 data['pixels_rasterized_with_non_solid_color'] | 107 data['pixels_rasterized_with_non_solid_color'] |
98 pixels_rasterized_as_opaque = \ | 108 pixels_rasterized_as_opaque = \ |
99 data['pixels_rasterized_as_opaque'] | 109 data['pixels_rasterized_as_opaque'] |
100 total_layers = data['total_layers'] | 110 total_layers = data['total_layers'] |
101 total_picture_layers = data['total_picture_layers'] | 111 total_picture_layers = data['total_picture_layers'] |
102 total_picture_layers_with_no_content = \ | 112 total_picture_layers_with_no_content = \ |
103 data['total_picture_layers_with_no_content'] | 113 data['total_picture_layers_with_no_content'] |
(...skipping 19 matching lines...) Expand all Loading... |
123 results.current_page, 'total_layers', 'count', total_layers)) | 133 results.current_page, 'total_layers', 'count', total_layers)) |
124 results.AddValue(scalar.ScalarValue( | 134 results.AddValue(scalar.ScalarValue( |
125 results.current_page, 'total_picture_layers', 'count', | 135 results.current_page, 'total_picture_layers', 'count', |
126 total_picture_layers)) | 136 total_picture_layers)) |
127 results.AddValue(scalar.ScalarValue( | 137 results.AddValue(scalar.ScalarValue( |
128 results.current_page, 'total_picture_layers_with_no_content', 'count', | 138 results.current_page, 'total_picture_layers_with_no_content', 'count', |
129 total_picture_layers_with_no_content)) | 139 total_picture_layers_with_no_content)) |
130 results.AddValue(scalar.ScalarValue( | 140 results.AddValue(scalar.ScalarValue( |
131 results.current_page, 'total_picture_layers_off_screen', 'count', | 141 results.current_page, 'total_picture_layers_off_screen', 'count', |
132 total_picture_layers_off_screen)) | 142 total_picture_layers_off_screen)) |
OLD | NEW |