| 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 time | 5 import time |
| 6 | 6 |
| 7 from telemetry.core import exceptions | 7 from telemetry.core import exceptions |
| 8 from telemetry.page import legacy_page_test | 8 from telemetry.page import legacy_page_test |
| 9 from telemetry.value import scalar | 9 from telemetry.value import scalar |
| 10 | 10 |
| 11 | 11 |
| 12 class RasterizeAndRecordMicro(legacy_page_test.LegacyPageTest): | 12 class RasterizeAndRecordMicro(legacy_page_test.LegacyPageTest): |
| 13 | 13 |
| 14 def __init__(self, start_wait_time=2, rasterize_repeat=100, record_repeat=100, | 14 def __init__(self, start_wait_time=2, rasterize_repeat=100, record_repeat=100, |
| 15 timeout=120, report_detailed_results=False): | 15 timeout=120, report_detailed_results=False): |
| 16 super(RasterizeAndRecordMicro, self).__init__() | 16 super(RasterizeAndRecordMicro, self).__init__() |
| 17 self._chrome_branch_number = None | 17 self._chrome_branch_number = None |
| 18 self._start_wait_time = start_wait_time | 18 self._start_wait_time = start_wait_time |
| 19 self._rasterize_repeat = rasterize_repeat | 19 self._rasterize_repeat = rasterize_repeat |
| 20 self._record_repeat = record_repeat | 20 self._record_repeat = record_repeat |
| 21 self._timeout = timeout | 21 self._timeout = timeout |
| 22 self._report_detailed_results = report_detailed_results | 22 self._report_detailed_results = report_detailed_results |
| 23 | 23 |
| 24 def CustomizeBrowserOptions(self, options): | 24 def CustomizeBrowserOptions(self, options): |
| 25 options.AppendExtraBrowserArgs([ | 25 options.AppendExtraBrowserArgs([ |
| 26 '--enable-impl-side-painting', | |
| 27 '--enable-threaded-compositing', | |
| 28 '--enable-gpu-benchmarking' | 26 '--enable-gpu-benchmarking' |
| 29 ]) | 27 ]) |
| 30 | 28 |
| 31 def ValidateAndMeasurePage(self, page, tab, results): | 29 def ValidateAndMeasurePage(self, page, tab, results): |
| 32 del page # unused | 30 del page # unused |
| 33 try: | 31 try: |
| 34 tab.WaitForDocumentReadyStateToBeComplete() | 32 tab.WaitForDocumentReadyStateToBeComplete() |
| 35 except exceptions.TimeoutException: | 33 except exceptions.TimeoutException: |
| 36 pass | 34 pass |
| 37 time.sleep(self._start_wait_time) | 35 time.sleep(self._start_wait_time) |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 results.current_page, 'total_layers', 'count', total_layers)) | 144 results.current_page, 'total_layers', 'count', total_layers)) |
| 147 results.AddValue(scalar.ScalarValue( | 145 results.AddValue(scalar.ScalarValue( |
| 148 results.current_page, 'total_picture_layers', 'count', | 146 results.current_page, 'total_picture_layers', 'count', |
| 149 total_picture_layers)) | 147 total_picture_layers)) |
| 150 results.AddValue(scalar.ScalarValue( | 148 results.AddValue(scalar.ScalarValue( |
| 151 results.current_page, 'total_picture_layers_with_no_content', 'count', | 149 results.current_page, 'total_picture_layers_with_no_content', 'count', |
| 152 total_picture_layers_with_no_content)) | 150 total_picture_layers_with_no_content)) |
| 153 results.AddValue(scalar.ScalarValue( | 151 results.AddValue(scalar.ScalarValue( |
| 154 results.current_page, 'total_picture_layers_off_screen', 'count', | 152 results.current_page, 'total_picture_layers_off_screen', 'count', |
| 155 total_picture_layers_off_screen)) | 153 total_picture_layers_off_screen)) |
| OLD | NEW |