| 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): | |
| 11 options = {'pageset_repeat': 5} | |
| 12 | |
| 13 def CreatePageTest(self, options): | |
| 14 return startup.Startup(cold=True) | |
| 15 | |
| 16 | |
| 17 class _StartupWarm(benchmark.Benchmark): | |
| 18 options = {'pageset_repeat': 20} | |
| 19 | |
| 20 def CreatePageTest(self, options): | |
| 21 return startup.Startup(cold=False) | |
| 22 | |
| 23 | |
| 24 @benchmark.Enabled('has tabs') | 10 @benchmark.Enabled('has tabs') |
| 25 @benchmark.Disabled('snowleopard') # crbug.com/336913 | 11 @benchmark.Disabled('snowleopard') # crbug.com/336913 |
| 26 class StartupColdBlankPage(_StartupCold): | 12 class StartupColdBlankPage(benchmark.Benchmark): |
| 27 tag = 'cold' | 13 tag = 'cold' |
| 14 test = startup.Startup |
| 28 page_set = page_sets.BlankPageSet | 15 page_set = page_sets.BlankPageSet |
| 16 options = {'cold': True, |
| 17 'pageset_repeat': 5} |
| 29 | 18 |
| 30 | 19 |
| 31 @benchmark.Enabled('has tabs') | 20 @benchmark.Enabled('has tabs') |
| 32 class StartupWarmBlankPage(_StartupWarm): | 21 class StartupWarmBlankPage(benchmark.Benchmark): |
| 33 tag = 'warm' | 22 tag = 'warm' |
| 23 test = startup.Startup |
| 34 page_set = page_sets.BlankPageSet | 24 page_set = page_sets.BlankPageSet |
| 25 options = {'warm': True, |
| 26 'pageset_repeat': 20} |
| 35 | 27 |
| 36 | 28 |
| 37 @benchmark.Disabled # crbug.com/336913 | 29 @benchmark.Disabled # crbug.com/336913 |
| 38 class StartupColdTheme(_StartupCold): | 30 class StartupColdTheme(benchmark.Benchmark): |
| 39 tag = 'theme_cold' | 31 tag = 'theme_cold' |
| 32 test = startup.Startup |
| 40 page_set = page_sets.BlankPageSet | 33 page_set = page_sets.BlankPageSet |
| 41 generated_profile_archive = 'theme_profile.zip' | 34 generated_profile_archive = 'theme_profile.zip' |
| 35 options = {'cold': True, |
| 36 'pageset_repeat': 5} |
| 42 | 37 |
| 43 | 38 |
| 44 @benchmark.Disabled | 39 @benchmark.Disabled |
| 45 class StartupWarmTheme(_StartupWarm): | 40 class StartupWarmTheme(benchmark.Benchmark): |
| 46 tag = 'theme_warm' | 41 tag = 'theme_warm' |
| 42 test = startup.Startup |
| 47 page_set = page_sets.BlankPageSet | 43 page_set = page_sets.BlankPageSet |
| 48 generated_profile_archive = 'theme_profile.zip' | 44 generated_profile_archive = 'theme_profile.zip' |
| 45 options = {'warm': True, |
| 46 'pageset_repeat': 20} |
| 49 | 47 |
| 50 | 48 |
| 51 @benchmark.Disabled # crbug.com/336913 | 49 @benchmark.Disabled # crbug.com/336913 |
| 52 class StartupColdManyExtensions(_StartupCold): | 50 class StartupColdManyExtensions(benchmark.Benchmark): |
| 53 tag = 'many_extensions_cold' | 51 tag = 'many_extensions_cold' |
| 52 test = startup.Startup |
| 54 page_set = page_sets.BlankPageSet | 53 page_set = page_sets.BlankPageSet |
| 55 generated_profile_archive = 'many_extensions_profile.zip' | 54 generated_profile_archive = 'many_extensions_profile.zip' |
| 55 options = {'cold': True, |
| 56 'pageset_repeat': 5} |
| 56 | 57 |
| 57 | 58 |
| 58 @benchmark.Disabled | 59 @benchmark.Disabled |
| 59 class StartupWarmManyExtensions(_StartupWarm): | 60 class StartupWarmManyExtensions(benchmark.Benchmark): |
| 60 tag = 'many_extensions_warm' | 61 tag = 'many_extensions_warm' |
| 62 test = startup.Startup |
| 61 page_set = page_sets.BlankPageSet | 63 page_set = page_sets.BlankPageSet |
| 62 generated_profile_archive = 'many_extensions_profile.zip' | 64 generated_profile_archive = 'many_extensions_profile.zip' |
| 65 options = {'warm': True, |
| 66 'pageset_repeat': 20} |
| OLD | NEW |