Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 from core import perf_benchmark | |
| 6 from measurements import startup | |
| 7 import page_sets | |
| 8 from telemetry import benchmark | |
| 9 | |
| 10 | |
| 11 class _StartWithExt(perf_benchmark.PerfBenchmark): | |
| 12 """Base Benchmark for testing startup with extensions. """ | |
|
erikchen
2015/07/14 23:36:14
extra whitespace after "."
sydli
2015/07/15 22:56:23
Done.
| |
| 13 page_set = page_sets.BlankPageSetWithExtensionProfile | |
| 14 tag = None | |
| 15 | |
| 16 @classmethod | |
| 17 def Name(cls): | |
| 18 return 'start_with_ext.blank_page' | |
| 19 | |
| 20 @classmethod | |
| 21 def ValueCanBeAddedPredicate(cls, _, is_first_result): | |
| 22 return not is_first_result | |
| 23 | |
| 24 def SetExtraBrowserOptions(self, options): | |
| 25 options.disable_default_apps = False | |
| 26 | |
| 27 def CreatePageTest(self, _): | |
| 28 is_cold = (self.tag == 'cold') | |
| 29 return startup.Startup(cold=is_cold) | |
| 30 | |
| 31 | |
| 32 @benchmark.Enabled('has tabs') | |
| 33 class StartWithExtCold(_StartWithExt): | |
| 34 """Measure time to start Chrome cold with extensions""" | |
|
erikchen
2015/07/14 23:36:14
period at end of sentence. ditto on line 45.
sydli
2015/07/15 22:56:23
Done.
| |
| 35 options = {'pageset_repeat': 5} | |
| 36 tag = 'cold' | |
| 37 | |
| 38 @classmethod | |
| 39 def Name(cls): | |
| 40 return 'start_with_ext.cold.blank_page' | |
| 41 | |
| 42 | |
| 43 @benchmark.Enabled('has tabs') | |
| 44 class StartWithExtWarm(_StartWithExt): | |
| 45 """Measure time to start Chrome warm with extensions""" | |
| 46 options = {'pageset_repeat': 20} | |
| 47 tag = 'warm' | |
| 48 | |
| 49 @classmethod | |
| 50 def Name(cls): | |
| 51 return 'start_with_ext.warm.blank_page' | |
| 52 | |
| OLD | NEW |