| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 collections | 5 import collections |
| 6 import page_sets | 6 import page_sets |
| 7 import re | 7 import re |
| 8 | 8 |
| 9 from measurements import timeline_controller | 9 from measurements import timeline_controller |
| 10 from metrics import speedindex | 10 from metrics import speedindex |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 chart_prefix = 'page_load' | 131 chart_prefix = 'page_load' |
| 132 self._page_open_times[url] += 1 | 132 self._page_open_times[url] += 1 |
| 133 if self._page_open_times[url] == 1: | 133 if self._page_open_times[url] == 1: |
| 134 chart_prefix += '_1st' | 134 chart_prefix += '_1st' |
| 135 elif self._page_open_times[url] == 2: | 135 elif self._page_open_times[url] == 2: |
| 136 chart_prefix += '_2nd' | 136 chart_prefix += '_2nd' |
| 137 else: | 137 else: |
| 138 chart_prefix += '_later' | 138 chart_prefix += '_later' |
| 139 self._speed_index.AddResults(tab, results, chart_prefix) | 139 self._speed_index.AddResults(tab, results, chart_prefix) |
| 140 | 140 |
| 141 @benchmark.Disabled | 141 @benchmark.Enabled('android') |
| 142 class ServiceWorkerPerfTest(benchmark.Benchmark): | 142 class ServiceWorkerPerfTest(benchmark.Benchmark): |
| 143 """Performance test on pages controlled by ServiceWorker""" | 143 """Performance test on pages controlled by ServiceWorker""" |
| 144 test = _ServiceWorkerMeasurement | 144 test = _ServiceWorkerMeasurement |
| 145 page_set = page_sets.ServiceWorkerPageSet | 145 page_set = page_sets.ServiceWorkerPageSet |
| OLD | NEW |