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.""" |
| 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 @benchmark.Enabled('mac') # Currently only works on mac. |
| 34 @benchmark.Disabled('win', 'linux', 'reference', 'android') |
| 35 class StartWithExtCold(_StartWithExt): |
| 36 """Measure time to start Chrome cold with extensions.""" |
| 37 options = {'pageset_repeat': 5} |
| 38 tag = 'cold' |
| 39 |
| 40 @classmethod |
| 41 def Name(cls): |
| 42 return 'start_with_ext.cold.blank_page' |
| 43 |
| 44 |
| 45 @benchmark.Enabled('has tabs') |
| 46 @benchmark.Enabled('mac') # Currently only works on mac. |
| 47 @benchmark.Disabled('win', 'linux', 'reference', 'android') |
| 48 class StartWithExtWarm(_StartWithExt): |
| 49 """Measure time to start Chrome warm with extensions.""" |
| 50 options = {'pageset_repeat': 20} |
| 51 tag = 'warm' |
| 52 |
| 53 @classmethod |
| 54 def Name(cls): |
| 55 return 'start_with_ext.warm.blank_page' |
| 56 |
OLD | NEW |