| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 browser_process = self._timeline_controller.model.browser_process | 167 browser_process = self._timeline_controller.model.browser_process |
| 168 filter_text = '(RegisterServiceWorker|'\ | 168 filter_text = '(RegisterServiceWorker|'\ |
| 169 'UnregisterServiceWorker|'\ | 169 'UnregisterServiceWorker|'\ |
| 170 'ProcessAllocate|'\ | 170 'ProcessAllocate|'\ |
| 171 'FindRegistrationForDocument|'\ | 171 'FindRegistrationForDocument|'\ |
| 172 'DispatchFetchEvent)' | 172 'DispatchFetchEvent)' |
| 173 timeline_metric.AddResultsOfEvents( | 173 timeline_metric.AddResultsOfEvents( |
| 174 browser_process, 'IOThread', filter_text , results) | 174 browser_process, 'IOThread', filter_text , results) |
| 175 | 175 |
| 176 | 176 |
| 177 # TODO(simonhatch): Temporarily disabling (http://crbug.com/433943) |
| 178 @benchmark.Disabled |
| 177 class ServiceWorkerPerfTest(benchmark.Benchmark): | 179 class ServiceWorkerPerfTest(benchmark.Benchmark): |
| 178 """Performance test on public applications using ServiceWorker""" | 180 """Performance test on public applications using ServiceWorker""" |
| 179 test = _ServiceWorkerMeasurement | 181 test = _ServiceWorkerMeasurement |
| 180 page_set = page_sets.ServiceWorkerPageSet | 182 page_set = page_sets.ServiceWorkerPageSet |
| 181 | 183 |
| 182 @classmethod | 184 @classmethod |
| 183 def Name(cls): | 185 def Name(cls): |
| 184 return 'service_worker.service_worker' | 186 return 'service_worker.service_worker' |
| 185 | 187 |
| 186 | 188 |
| 187 # Disabled due to redness on the tree. crbug.com/442752 | 189 # Disabled due to redness on the tree. crbug.com/442752 |
| 188 @benchmark.Disabled | 190 @benchmark.Disabled |
| 189 class ServiceWorkerMicroBenchmarkPerfTest(benchmark.Benchmark): | 191 class ServiceWorkerMicroBenchmarkPerfTest(benchmark.Benchmark): |
| 190 """This test measures the performance of pages using ServiceWorker. | 192 """This test measures the performance of pages using ServiceWorker. |
| 191 | 193 |
| 192 As a page set, two benchamrk pages (many registration, many concurrent | 194 As a page set, two benchamrk pages (many registration, many concurrent |
| 193 fetching) and one application (Trained-to-thrill: | 195 fetching) and one application (Trained-to-thrill: |
| 194 https://jakearchibald.github.io/trained-to-thrill/) are included. Execution | 196 https://jakearchibald.github.io/trained-to-thrill/) are included. Execution |
| 195 time of these pages will be shown as Speed Index, and TRACE_EVENTs are | 197 time of these pages will be shown as Speed Index, and TRACE_EVENTs are |
| 196 subsidiary information to know more detail performance regression. | 198 subsidiary information to know more detail performance regression. |
| 197 """ | 199 """ |
| 198 test = _ServiceWorkerMicroBenchmarkMeasurement | 200 test = _ServiceWorkerMicroBenchmarkMeasurement |
| 199 page_set = page_sets.ServiceWorkerMicroBenchmarkPageSet | 201 page_set = page_sets.ServiceWorkerMicroBenchmarkPageSet |
| 200 @classmethod | 202 @classmethod |
| 201 def Name(cls): | 203 def Name(cls): |
| 202 return 'service_worker.service_worker_micro_benchmark' | 204 return 'service_worker.service_worker_micro_benchmark' |
| 203 | 205 |
| OLD | NEW |