OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright 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 """The page cycler measurement. | 5 """The page cycler measurement. |
6 | 6 |
7 This measurement registers a window load handler in which is forces a layout and | 7 This measurement registers a window load handler in which is forces a layout and |
8 then records the value of performance.now(). This call to now() measures the | 8 then records the value of performance.now(). This call to now() measures the |
9 time from navigationStart (immediately after the previous page's beforeunload | 9 time from navigationStart (immediately after the previous page's beforeunload |
10 event) until after the layout in the page's load event. In addition, two garbage | 10 event) until after the layout in the page's load event. In addition, two garbage |
11 collections are performed in between the page loads (in the beforeunload event). | 11 collections are performed in between the page loads (in the beforeunload event). |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 # preserve any initial profile cache for as long as possible. | 161 # preserve any initial profile cache for as long as possible. |
162 # The second is that, if we did cold runs first, we'd have a transition | 162 # The second is that, if we did cold runs first, we'd have a transition |
163 # page set during which we wanted the run for each URL to both | 163 # page set during which we wanted the run for each URL to both |
164 # contribute to the cold data and warm the catch for the following | 164 # contribute to the cold data and warm the catch for the following |
165 # warm run, and clearing the cache before the load of the following | 165 # warm run, and clearing the cache before the load of the following |
166 # URL would eliminate the intended warmup for the previous URL. | 166 # URL would eliminate the intended warmup for the previous URL. |
167 return (self._has_loaded_page[url] >= self._cold_run_start_index) | 167 return (self._has_loaded_page[url] >= self._cold_run_start_index) |
168 | 168 |
169 def results_are_the_same_on_every_page(self): | 169 def results_are_the_same_on_every_page(self): |
170 return False | 170 return False |
OLD | NEW |