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 | |
10 from metrics import speedindex | |
11 from telemetry import benchmark | 9 from telemetry import benchmark |
12 from telemetry.core import util | 10 from telemetry.core import util |
13 from telemetry.page import page_test | 11 from telemetry.page import page_test |
14 from telemetry.timeline import async_slice as async_slice_module | 12 from telemetry.timeline import async_slice as async_slice_module |
15 from telemetry.timeline import slice as slice_module | 13 from telemetry.timeline import slice as slice_module |
16 from telemetry.value import scalar | 14 from telemetry.value import scalar |
17 | 15 |
| 16 from measurements import timeline_controller |
| 17 from metrics import speedindex |
| 18 |
18 | 19 |
19 class _ServiceWorkerTimelineMetric(object): | 20 class _ServiceWorkerTimelineMetric(object): |
20 def AddResultsOfCounters(self, process, counter_regex_string, results): | 21 def AddResultsOfCounters(self, process, counter_regex_string, results): |
21 counter_filter = re.compile(counter_regex_string) | 22 counter_filter = re.compile(counter_regex_string) |
22 for counter_name, counter in process.counters.iteritems(): | 23 for counter_name, counter in process.counters.iteritems(): |
23 if not counter_filter.search(counter_name): | 24 if not counter_filter.search(counter_name): |
24 continue | 25 continue |
25 | 26 |
26 total = sum(counter.totals) | 27 total = sum(counter.totals) |
27 | 28 |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 https://jakearchibald.github.io/trained-to-thrill/) are included. Execution | 196 https://jakearchibald.github.io/trained-to-thrill/) are included. Execution |
196 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 |
197 subsidiary information to know more detail performance regression. | 198 subsidiary information to know more detail performance regression. |
198 """ | 199 """ |
199 test = _ServiceWorkerMicroBenchmarkMeasurement | 200 test = _ServiceWorkerMicroBenchmarkMeasurement |
200 page_set = page_sets.ServiceWorkerMicroBenchmarkPageSet | 201 page_set = page_sets.ServiceWorkerMicroBenchmarkPageSet |
201 @classmethod | 202 @classmethod |
202 def Name(cls): | 203 def Name(cls): |
203 return 'service_worker.service_worker_micro_benchmark' | 204 return 'service_worker.service_worker_micro_benchmark' |
204 | 205 |
OLD | NEW |