| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 from measurements import startup | 5 from measurements import startup |
| 6 import page_sets | 6 import page_sets |
| 7 from telemetry import benchmark | 7 from telemetry import benchmark |
| 8 | 8 |
| 9 | 9 |
| 10 class _StartupCold(benchmark.Benchmark): | 10 class _StartupCold(benchmark.Benchmark): |
| 11 """Measures cold startup time with a clean profile.""" | 11 """Measures cold startup time with a clean profile.""" |
| 12 options = {'pageset_repeat': 5} | 12 options = {'pageset_repeat': 5} |
| 13 | 13 |
| 14 @classmethod |
| 15 def Name(cls): |
| 16 return 'startup' |
| 17 |
| 14 def CreatePageTest(self, options): | 18 def CreatePageTest(self, options): |
| 15 return startup.Startup(cold=True) | 19 return startup.Startup(cold=True) |
| 16 | 20 |
| 17 | 21 |
| 18 class _StartupWarm(benchmark.Benchmark): | 22 class _StartupWarm(benchmark.Benchmark): |
| 19 """Measures warm startup time with a clean profile.""" | 23 """Measures warm startup time with a clean profile.""" |
| 20 options = {'pageset_repeat': 20} | 24 options = {'pageset_repeat': 20} |
| 21 | 25 |
| 26 @classmethod |
| 27 def Name(cls): |
| 28 return 'startup' |
| 29 |
| 22 def CreatePageTest(self, options): | 30 def CreatePageTest(self, options): |
| 23 return startup.Startup(cold=False) | 31 return startup.Startup(cold=False) |
| 24 | 32 |
| 25 | 33 |
| 26 @benchmark.Enabled('has tabs') | 34 @benchmark.Enabled('has tabs') |
| 27 @benchmark.Disabled('snowleopard') # crbug.com/336913 | 35 @benchmark.Disabled('snowleopard') # crbug.com/336913 |
| 28 class StartupColdBlankPage(_StartupCold): | 36 class StartupColdBlankPage(_StartupCold): |
| 29 """Measures cold startup time with a clean profile.""" | 37 """Measures cold startup time with a clean profile.""" |
| 30 tag = 'cold' | 38 tag = 'cold' |
| 31 page_set = page_sets.BlankPageSet | 39 page_set = page_sets.BlankPageSet |
| 32 | 40 |
| 41 @classmethod |
| 42 def Name(cls): |
| 43 return 'startup.cold.blank_page' |
| 44 |
| 33 | 45 |
| 34 @benchmark.Enabled('has tabs') | 46 @benchmark.Enabled('has tabs') |
| 35 class StartupWarmBlankPage(_StartupWarm): | 47 class StartupWarmBlankPage(_StartupWarm): |
| 36 """Measures warm startup time with a clean profile.""" | 48 """Measures warm startup time with a clean profile.""" |
| 37 tag = 'warm' | 49 tag = 'warm' |
| 38 page_set = page_sets.BlankPageSet | 50 page_set = page_sets.BlankPageSet |
| 39 | 51 |
| 52 @classmethod |
| 53 def Name(cls): |
| 54 return 'startup.warm.blank_page' |
| 55 |
| 40 | 56 |
| 41 @benchmark.Disabled # crbug.com/336913 | 57 @benchmark.Disabled # crbug.com/336913 |
| 42 class StartupColdTheme(_StartupCold): | 58 class StartupColdTheme(_StartupCold): |
| 43 tag = 'theme_cold' | 59 tag = 'theme_cold' |
| 44 page_set = page_sets.BlankPageSet | 60 page_set = page_sets.BlankPageSet |
| 45 generated_profile_archive = 'theme_profile.zip' | 61 generated_profile_archive = 'theme_profile.zip' |
| 46 | 62 |
| 63 @classmethod |
| 64 def Name(cls): |
| 65 return 'startup.theme_cold.blank_page' |
| 66 |
| 47 | 67 |
| 48 @benchmark.Disabled | 68 @benchmark.Disabled |
| 49 class StartupWarmTheme(_StartupWarm): | 69 class StartupWarmTheme(_StartupWarm): |
| 50 tag = 'theme_warm' | 70 tag = 'theme_warm' |
| 51 page_set = page_sets.BlankPageSet | 71 page_set = page_sets.BlankPageSet |
| 52 generated_profile_archive = 'theme_profile.zip' | 72 generated_profile_archive = 'theme_profile.zip' |
| 53 | 73 |
| 74 @classmethod |
| 75 def Name(cls): |
| 76 return 'startup.theme_warm.blank_page' |
| 77 |
| 54 | 78 |
| 55 @benchmark.Disabled # crbug.com/336913 | 79 @benchmark.Disabled # crbug.com/336913 |
| 56 class StartupColdManyExtensions(_StartupCold): | 80 class StartupColdManyExtensions(_StartupCold): |
| 57 tag = 'many_extensions_cold' | 81 tag = 'many_extensions_cold' |
| 58 page_set = page_sets.BlankPageSet | 82 page_set = page_sets.BlankPageSet |
| 59 generated_profile_archive = 'many_extensions_profile.zip' | 83 generated_profile_archive = 'many_extensions_profile.zip' |
| 60 | 84 |
| 85 @classmethod |
| 86 def Name(cls): |
| 87 return 'startup.many_extensions_cold.blank_page' |
| 88 |
| 61 | 89 |
| 62 @benchmark.Disabled | 90 @benchmark.Disabled |
| 63 class StartupWarmManyExtensions(_StartupWarm): | 91 class StartupWarmManyExtensions(_StartupWarm): |
| 64 tag = 'many_extensions_warm' | 92 tag = 'many_extensions_warm' |
| 65 page_set = page_sets.BlankPageSet | 93 page_set = page_sets.BlankPageSet |
| 66 generated_profile_archive = 'many_extensions_profile.zip' | 94 generated_profile_archive = 'many_extensions_profile.zip' |
| 95 @classmethod |
| 96 def Name(cls): |
| 97 return 'startup.many_extensions_warm.blank_page' |
| 98 |
| OLD | NEW |