| 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 page_cycler | 5 from measurements import page_cycler |
| 6 import page_sets | 6 import page_sets |
| 7 from telemetry import benchmark | 7 from telemetry import benchmark |
| 8 | 8 |
| 9 | 9 |
| 10 class _PageCycler(benchmark.Benchmark): | 10 class _PageCycler(benchmark.Benchmark): |
| 11 options = {'pageset_repeat': 6} | 11 options = {'pageset_repeat': 6} |
| 12 | 12 |
| 13 @classmethod | 13 @classmethod |
| 14 def Name(cls): |
| 15 return 'page_cycler' |
| 16 |
| 17 @classmethod |
| 14 def AddBenchmarkCommandLineArgs(cls, parser): | 18 def AddBenchmarkCommandLineArgs(cls, parser): |
| 15 parser.add_option('--v8-object-stats', | 19 parser.add_option('--v8-object-stats', |
| 16 action='store_true', | 20 action='store_true', |
| 17 help='Enable detailed V8 object statistics.') | 21 help='Enable detailed V8 object statistics.') |
| 18 | 22 |
| 19 parser.add_option('--report-speed-index', | 23 parser.add_option('--report-speed-index', |
| 20 action='store_true', | 24 action='store_true', |
| 21 help='Enable the speed index metric.') | 25 help='Enable the speed index metric.') |
| 22 | 26 |
| 23 parser.add_option('--cold-load-percent', type='int', default=50, | 27 parser.add_option('--cold-load-percent', type='int', default=50, |
| 24 help='%d of page visits for which a cold load is forced') | 28 help='%d of page visits for which a cold load is forced') |
| 25 | 29 |
| 26 def CreatePageTest(self, options): | 30 def CreatePageTest(self, options): |
| 27 return page_cycler.PageCycler( | 31 return page_cycler.PageCycler( |
| 28 page_repeat = options.page_repeat, | 32 page_repeat = options.page_repeat, |
| 29 pageset_repeat = options.pageset_repeat, | 33 pageset_repeat = options.pageset_repeat, |
| 30 cold_load_percent = options.cold_load_percent, | 34 cold_load_percent = options.cold_load_percent, |
| 31 record_v8_object_stats = options.v8_object_stats, | 35 record_v8_object_stats = options.v8_object_stats, |
| 32 report_speed_index = options.report_speed_index) | 36 report_speed_index = options.report_speed_index) |
| 33 | 37 |
| 34 | 38 |
| 35 # This is an old page set, we intend to remove it after more modern benchmarks | 39 # This is an old page set, we intend to remove it after more modern benchmarks |
| 36 # work on CrOS. | 40 # work on CrOS. |
| 37 @benchmark.Enabled('chromeos') | 41 @benchmark.Enabled('chromeos') |
| 38 class PageCyclerDhtml(_PageCycler): | 42 class PageCyclerDhtml(_PageCycler): |
| 39 """Benchmarks for various DHTML operations like simple animations.""" | 43 """Benchmarks for various DHTML operations like simple animations.""" |
| 40 page_set = page_sets.DhtmlPageSet | 44 page_set = page_sets.DhtmlPageSet |
| 41 | 45 |
| 46 @classmethod |
| 47 def Name(cls): |
| 48 return 'page_cycler.dhtml' |
| 49 |
| 42 | 50 |
| 43 class PageCyclerIntlArFaHe(_PageCycler): | 51 class PageCyclerIntlArFaHe(_PageCycler): |
| 44 """Page load time for a variety of pages in Arabic, Farsi and Hebrew. | 52 """Page load time for a variety of pages in Arabic, Farsi and Hebrew. |
| 45 | 53 |
| 46 Runs against pages recorded in April, 2013. | 54 Runs against pages recorded in April, 2013. |
| 47 """ | 55 """ |
| 48 page_set = page_sets.IntlArFaHePageSet | 56 page_set = page_sets.IntlArFaHePageSet |
| 49 | 57 |
| 58 @classmethod |
| 59 def Name(cls): |
| 60 return 'page_cycler.intl_ar_fa_he' |
| 61 |
| 50 | 62 |
| 51 @benchmark.Disabled('win') # crbug.com/388337 | 63 @benchmark.Disabled('win') # crbug.com/388337 |
| 52 class PageCyclerIntlEsFrPtBr(_PageCycler): | 64 class PageCyclerIntlEsFrPtBr(_PageCycler): |
| 53 """Page load time for a pages in Spanish, French and Brazilian Portuguese. | 65 """Page load time for a pages in Spanish, French and Brazilian Portuguese. |
| 54 | 66 |
| 55 Runs against pages recorded in April, 2013. | 67 Runs against pages recorded in April, 2013. |
| 56 """ | 68 """ |
| 57 page_set = page_sets.IntlEsFrPtBrPageSet | 69 page_set = page_sets.IntlEsFrPtBrPageSet |
| 58 | 70 |
| 71 @classmethod |
| 72 def Name(cls): |
| 73 return 'page_cycler.intl_es_fr_pt-BR' |
| 74 |
| 59 | 75 |
| 60 class PageCyclerIntlHiRu(_PageCycler): | 76 class PageCyclerIntlHiRu(_PageCycler): |
| 61 """Page load time benchmark for a variety of pages in Hindi and Russian. | 77 """Page load time benchmark for a variety of pages in Hindi and Russian. |
| 62 | 78 |
| 63 Runs against pages recorded in April, 2013. | 79 Runs against pages recorded in April, 2013. |
| 64 """ | 80 """ |
| 65 page_set = page_sets.IntlHiRuPageSet | 81 page_set = page_sets.IntlHiRuPageSet |
| 66 | 82 |
| 83 @classmethod |
| 84 def Name(cls): |
| 85 return 'page_cycler.intl_hi_ru' |
| 86 |
| 67 | 87 |
| 68 @benchmark.Disabled('android', 'win') # crbug.com/379564, crbug.com/330909 | 88 @benchmark.Disabled('android', 'win') # crbug.com/379564, crbug.com/330909 |
| 69 class PageCyclerIntlJaZh(_PageCycler): | 89 class PageCyclerIntlJaZh(_PageCycler): |
| 70 """Page load time benchmark for a variety of pages in Japanese and Chinese. | 90 """Page load time benchmark for a variety of pages in Japanese and Chinese. |
| 71 | 91 |
| 72 Runs against pages recorded in April, 2013. | 92 Runs against pages recorded in April, 2013. |
| 73 """ | 93 """ |
| 74 page_set = page_sets.IntlJaZhPageSet | 94 page_set = page_sets.IntlJaZhPageSet |
| 75 | 95 |
| 96 @classmethod |
| 97 def Name(cls): |
| 98 return 'page_cycler.intl_ja_zh' |
| 99 |
| 76 | 100 |
| 77 @benchmark.Disabled('xp') # crbug.com/434366 | 101 @benchmark.Disabled('xp') # crbug.com/434366 |
| 78 class PageCyclerIntlKoThVi(_PageCycler): | 102 class PageCyclerIntlKoThVi(_PageCycler): |
| 79 """Page load time for a variety of pages in Korean, Thai and Vietnamese. | 103 """Page load time for a variety of pages in Korean, Thai and Vietnamese. |
| 80 | 104 |
| 81 Runs against pages recorded in April, 2013. | 105 Runs against pages recorded in April, 2013. |
| 82 """ | 106 """ |
| 83 page_set = page_sets.IntlKoThViPageSet | 107 page_set = page_sets.IntlKoThViPageSet |
| 84 | 108 |
| 109 @classmethod |
| 110 def Name(cls): |
| 111 return 'page_cycler.intl_ko_th_vi' |
| 112 |
| 85 | 113 |
| 86 class PageCyclerMorejs(_PageCycler): | 114 class PageCyclerMorejs(_PageCycler): |
| 87 """Page load for a variety of pages that were JavaScript heavy in 2009.""" | 115 """Page load for a variety of pages that were JavaScript heavy in 2009.""" |
| 88 page_set = page_sets.MorejsPageSet | 116 page_set = page_sets.MorejsPageSet |
| 89 | 117 |
| 118 @classmethod |
| 119 def Name(cls): |
| 120 return 'page_cycler.morejs' |
| 121 |
| 90 | 122 |
| 91 # This is an old page set, we intend to remove it after more modern benchmarks | 123 # This is an old page set, we intend to remove it after more modern benchmarks |
| 92 # work on CrOS. | 124 # work on CrOS. |
| 93 @benchmark.Enabled('chromeos') | 125 @benchmark.Enabled('chromeos') |
| 94 class PageCyclerMoz(_PageCycler): | 126 class PageCyclerMoz(_PageCycler): |
| 95 """Page load for mozilla's original page set. Recorded in December 2000.""" | 127 """Page load for mozilla's original page set. Recorded in December 2000.""" |
| 96 page_set = page_sets.MozPageSet | 128 page_set = page_sets.MozPageSet |
| 97 | 129 |
| 130 @classmethod |
| 131 def Name(cls): |
| 132 return 'page_cycler.moz' |
| 133 |
| 98 | 134 |
| 99 @benchmark.Disabled('linux', 'win', 'mac') # crbug.com/353260 | 135 @benchmark.Disabled('linux', 'win', 'mac') # crbug.com/353260 |
| 100 class PageCyclerNetsimTop10(_PageCycler): | 136 class PageCyclerNetsimTop10(_PageCycler): |
| 101 """Measures load time of the top 10 sites under simulated cable network. | 137 """Measures load time of the top 10 sites under simulated cable network. |
| 102 | 138 |
| 103 Recorded in June, 2013. Pages are loaded under the simplisticly simulated | 139 Recorded in June, 2013. Pages are loaded under the simplisticly simulated |
| 104 bandwidth and RTT constraints of a cable modem (5Mbit/s down, 1Mbit/s up, | 140 bandwidth and RTT constraints of a cable modem (5Mbit/s down, 1Mbit/s up, |
| 105 28ms RTT). Contention is realistically simulated, but slow start is not. | 141 28ms RTT). Contention is realistically simulated, but slow start is not. |
| 106 DNS lookups are 'free'. | 142 DNS lookups are 'free'. |
| 107 """ | 143 """ |
| 108 tag = 'netsim' | 144 tag = 'netsim' |
| 109 page_set = page_sets.Top10PageSet | 145 page_set = page_sets.Top10PageSet |
| 110 options = { | 146 options = { |
| 111 'cold_load_percent': 100, | 147 'cold_load_percent': 100, |
| 112 'extra_wpr_args_as_string': '--shaping_type=proxy --net=cable', | 148 'extra_wpr_args_as_string': '--shaping_type=proxy --net=cable', |
| 113 'pageset_repeat': 6, | 149 'pageset_repeat': 6, |
| 114 } | 150 } |
| 115 | 151 |
| 152 @classmethod |
| 153 def Name(cls): |
| 154 return 'page_cycler.netsim.top_10' |
| 155 |
| 116 def CreatePageTest(self, options): | 156 def CreatePageTest(self, options): |
| 117 return page_cycler.PageCycler( | 157 return page_cycler.PageCycler( |
| 118 page_repeat = options.page_repeat, | 158 page_repeat = options.page_repeat, |
| 119 pageset_repeat = options.pageset_repeat, | 159 pageset_repeat = options.pageset_repeat, |
| 120 cold_load_percent = options.cold_load_percent, | 160 cold_load_percent = options.cold_load_percent, |
| 121 record_v8_object_stats = options.v8_object_stats, | 161 record_v8_object_stats = options.v8_object_stats, |
| 122 report_speed_index = options.report_speed_index, | 162 report_speed_index = options.report_speed_index, |
| 123 clear_cache_before_each_run = True) | 163 clear_cache_before_each_run = True) |
| 124 | 164 |
| 125 | 165 |
| 126 @benchmark.Enabled('android') | 166 @benchmark.Enabled('android') |
| 127 class PageCyclerTop10Mobile(_PageCycler): | 167 class PageCyclerTop10Mobile(_PageCycler): |
| 128 """Page load time benchmark for the top 10 mobile web pages. | 168 """Page load time benchmark for the top 10 mobile web pages. |
| 129 | 169 |
| 130 Runs against pages recorded in November, 2013. | 170 Runs against pages recorded in November, 2013. |
| 131 """ | 171 """ |
| 132 page_set = page_sets.Top10MobilePageSet | 172 page_set = page_sets.Top10MobilePageSet |
| 133 | 173 |
| 174 @classmethod |
| 175 def Name(cls): |
| 176 return 'page_cycler.top_10_mobile' |
| 177 |
| 134 | 178 |
| 135 @benchmark.Disabled | 179 @benchmark.Disabled |
| 136 class PageCyclerKeyMobileSites(_PageCycler): | 180 class PageCyclerKeyMobileSites(_PageCycler): |
| 137 """Page load time benchmark for key mobile sites.""" | 181 """Page load time benchmark for key mobile sites.""" |
| 138 page_set = page_sets.KeyMobileSitesSmoothPageSet | 182 page_set = page_sets.KeyMobileSitesSmoothPageSet |
| 139 | 183 |
| 184 @classmethod |
| 185 def Name(cls): |
| 186 return 'page_cycler.key_mobile_sites_smooth' |
| 187 |
| 140 | 188 |
| 141 @benchmark.Disabled('android') # crbug.com/357326 | 189 @benchmark.Disabled('android') # crbug.com/357326 |
| 142 class PageCyclerToughLayoutCases(_PageCycler): | 190 class PageCyclerToughLayoutCases(_PageCycler): |
| 143 """Page loading for the slowest layouts observed in the Alexa top 1 million. | 191 """Page loading for the slowest layouts observed in the Alexa top 1 million. |
| 144 | 192 |
| 145 Recorded in July 2013. | 193 Recorded in July 2013. |
| 146 """ | 194 """ |
| 147 page_set = page_sets.ToughLayoutCasesPageSet | 195 page_set = page_sets.ToughLayoutCasesPageSet |
| 148 | 196 |
| 197 @classmethod |
| 198 def Name(cls): |
| 199 return 'page_cycler.tough_layout_cases' |
| 200 |
| 149 | 201 |
| 150 # crbug.com/273986: This test is really flakey on xp. | 202 # crbug.com/273986: This test is really flakey on xp. |
| 151 @benchmark.Disabled('win') | 203 @benchmark.Disabled('win') |
| 152 class PageCyclerTypical25(_PageCycler): | 204 class PageCyclerTypical25(_PageCycler): |
| 153 """Page load time benchmark for a 25 typical web pages. | 205 """Page load time benchmark for a 25 typical web pages. |
| 154 | 206 |
| 155 Designed to represent typical, not highly optimized or highly popular web | 207 Designed to represent typical, not highly optimized or highly popular web |
| 156 sites. Runs against pages recorded in June, 2014. | 208 sites. Runs against pages recorded in June, 2014. |
| 157 """ | 209 """ |
| 158 page_set = page_sets.Typical25PageSet | 210 page_set = page_sets.Typical25PageSet |
| 159 | 211 |
| 212 @classmethod |
| 213 def Name(cls): |
| 214 return 'page_cycler.typical_25' |
| 215 |
| 160 | 216 |
| 161 @benchmark.Disabled # crbug.com/443730 | 217 @benchmark.Disabled # crbug.com/443730 |
| 162 class PageCyclerBigJs(_PageCycler): | 218 class PageCyclerBigJs(_PageCycler): |
| 163 page_set = page_sets.BigJsPageSet | 219 page_set = page_sets.BigJsPageSet |
| 220 @classmethod |
| 221 def Name(cls): |
| 222 return 'page_cycler.big_js' |
| 223 |
| OLD | NEW |