Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 """The page cycler v2. | 5 """The page cycler v2. |
| 6 | 6 |
| 7 For details, see design doc: | 7 For details, see design doc: |
| 8 https://docs.google.com/document/d/1EZQX-x3eEphXupiX-Hq7T4Afju5_sIdxPWYetj7ynd0 | 8 https://docs.google.com/document/d/1EZQX-x3eEphXupiX-Hq7T4Afju5_sIdxPWYetj7ynd0 |
| 9 """ | 9 """ |
| 10 | 10 |
| 11 from core import perf_benchmark | 11 from core import perf_benchmark |
| 12 import page_sets | 12 import page_sets |
| 13 | 13 |
| 14 from telemetry import benchmark | 14 from telemetry import benchmark |
| 15 from telemetry.page import cache_temperature | 15 from telemetry.page import cache_temperature |
| 16 from telemetry.timeline import chrome_trace_category_filter | 16 from telemetry.timeline import chrome_trace_category_filter |
| 17 from telemetry.web_perf import timeline_based_measurement | 17 from telemetry.web_perf import timeline_based_measurement |
| 18 | 18 |
| 19 | 19 |
| 20 class _PageCyclerV2(perf_benchmark.PerfBenchmark): | 20 class PageCyclerV2(perf_benchmark.PerfBenchmark): |
|
nednguyen
2016/09/30 09:46:56
You need to keep the name prefixed with "_", other
Kunihiko Sakamoto
2016/10/03 07:30:08
Done.
| |
| 21 options = {'pageset_repeat': 2} | 21 options = {'pageset_repeat': 2} |
| 22 | 22 |
| 23 def CreateTimelineBasedMeasurementOptions(self): | 23 def CreateTimelineBasedMeasurementOptions(self): |
| 24 cat_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter() | 24 cat_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter() |
| 25 | 25 |
| 26 # "blink.console" is used for marking ranges in | 26 # "blink.console" is used for marking ranges in |
| 27 # cache_temperature.MarkTelemetryInternal. | 27 # cache_temperature.MarkTelemetryInternal. |
| 28 cat_filter.AddIncludedCategory('blink.console') | 28 cat_filter.AddIncludedCategory('blink.console') |
| 29 | 29 |
| 30 # "navigation" and "blink.user_timing" are needed to capture core | 30 # "navigation" and "blink.user_timing" are needed to capture core |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 57 return True | 57 return True |
| 58 | 58 |
| 59 # crbug.com/651188 | 59 # crbug.com/651188 |
| 60 if (possible_browser.platform.GetDeviceTypeName() == 'Nexus 6' and | 60 if (possible_browser.platform.GetDeviceTypeName() == 'Nexus 6' and |
| 61 possible_browser.browser_type == 'android-webview'): | 61 possible_browser.browser_type == 'android-webview'): |
| 62 return True | 62 return True |
| 63 | 63 |
| 64 return False | 64 return False |
| 65 | 65 |
| 66 | 66 |
| 67 class PageCyclerV2Typical25(_PageCyclerV2): | 67 class PageCyclerV2Typical25(PageCyclerV2): |
| 68 """Page load time benchmark for a 25 typical web pages. | 68 """Page load time benchmark for a 25 typical web pages. |
| 69 | 69 |
| 70 Designed to represent typical, not highly optimized or highly popular web | 70 Designed to represent typical, not highly optimized or highly popular web |
| 71 sites. Runs against pages recorded in June, 2014. | 71 sites. Runs against pages recorded in June, 2014. |
| 72 """ | 72 """ |
| 73 | 73 |
| 74 @classmethod | 74 @classmethod |
| 75 def Name(cls): | 75 def Name(cls): |
| 76 return 'page_cycler_v2.typical_25' | 76 return 'page_cycler_v2.typical_25' |
| 77 | 77 |
| 78 def CreateStorySet(self, options): | 78 def CreateStorySet(self, options): |
| 79 return page_sets.Typical25PageSet(run_no_page_interactions=True, | 79 return page_sets.Typical25PageSet(run_no_page_interactions=True, |
| 80 cache_temperatures=[ | 80 cache_temperatures=[ |
| 81 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) | 81 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) |
| 82 | 82 |
| 83 | 83 |
| 84 class PageCyclerV2IntlArFaHe(_PageCyclerV2): | 84 class PageCyclerV2IntlArFaHe(PageCyclerV2): |
| 85 """Page load time for a variety of pages in Arabic, Farsi and Hebrew. | 85 """Page load time for a variety of pages in Arabic, Farsi and Hebrew. |
| 86 | 86 |
| 87 Runs against pages recorded in April, 2013. | 87 Runs against pages recorded in April, 2013. |
| 88 """ | 88 """ |
| 89 page_set = page_sets.IntlArFaHePageSet | 89 page_set = page_sets.IntlArFaHePageSet |
| 90 | 90 |
| 91 @classmethod | 91 @classmethod |
| 92 def Name(cls): | 92 def Name(cls): |
| 93 return 'page_cycler_v2.intl_ar_fa_he' | 93 return 'page_cycler_v2.intl_ar_fa_he' |
| 94 | 94 |
| 95 def CreateStorySet(self, options): | 95 def CreateStorySet(self, options): |
| 96 return page_sets.IntlArFaHePageSet(cache_temperatures=[ | 96 return page_sets.IntlArFaHePageSet(cache_temperatures=[ |
| 97 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) | 97 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) |
| 98 | 98 |
| 99 | 99 |
| 100 class PageCyclerV2IntlEsFrPtBr(_PageCyclerV2): | 100 class PageCyclerV2IntlEsFrPtBr(PageCyclerV2): |
| 101 """Page load time for a pages in Spanish, French and Brazilian Portuguese. | 101 """Page load time for a pages in Spanish, French and Brazilian Portuguese. |
| 102 | 102 |
| 103 Runs against pages recorded in April, 2013. | 103 Runs against pages recorded in April, 2013. |
| 104 """ | 104 """ |
| 105 page_set = page_sets.IntlEsFrPtBrPageSet | 105 page_set = page_sets.IntlEsFrPtBrPageSet |
| 106 | 106 |
| 107 @classmethod | 107 @classmethod |
| 108 def Name(cls): | 108 def Name(cls): |
| 109 return 'page_cycler_v2.intl_es_fr_pt-BR' | 109 return 'page_cycler_v2.intl_es_fr_pt-BR' |
| 110 | 110 |
| 111 def CreateStorySet(self, options): | 111 def CreateStorySet(self, options): |
| 112 return page_sets.IntlEsFrPtBrPageSet(cache_temperatures=[ | 112 return page_sets.IntlEsFrPtBrPageSet(cache_temperatures=[ |
| 113 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) | 113 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) |
| 114 | 114 |
| 115 | 115 |
| 116 class PageCyclerV2IntlHiRu(_PageCyclerV2): | 116 class PageCyclerV2IntlHiRu(PageCyclerV2): |
| 117 """Page load time benchmark for a variety of pages in Hindi and Russian. | 117 """Page load time benchmark for a variety of pages in Hindi and Russian. |
| 118 | 118 |
| 119 Runs against pages recorded in April, 2013. | 119 Runs against pages recorded in April, 2013. |
| 120 """ | 120 """ |
| 121 page_set = page_sets.IntlHiRuPageSet | 121 page_set = page_sets.IntlHiRuPageSet |
| 122 | 122 |
| 123 @classmethod | 123 @classmethod |
| 124 def Name(cls): | 124 def Name(cls): |
| 125 return 'page_cycler_v2.intl_hi_ru' | 125 return 'page_cycler_v2.intl_hi_ru' |
| 126 | 126 |
| 127 def CreateStorySet(self, options): | 127 def CreateStorySet(self, options): |
| 128 return page_sets.IntlHiRuPageSet(cache_temperatures=[ | 128 return page_sets.IntlHiRuPageSet(cache_temperatures=[ |
| 129 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) | 129 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) |
| 130 | 130 |
| 131 | 131 |
| 132 class PageCyclerV2IntlJaZh(_PageCyclerV2): | 132 class PageCyclerV2IntlJaZh(PageCyclerV2): |
| 133 """Page load time benchmark for a variety of pages in Japanese and Chinese. | 133 """Page load time benchmark for a variety of pages in Japanese and Chinese. |
| 134 | 134 |
| 135 Runs against pages recorded in April, 2013. | 135 Runs against pages recorded in April, 2013. |
| 136 """ | 136 """ |
| 137 | 137 |
| 138 @classmethod | 138 @classmethod |
| 139 def Name(cls): | 139 def Name(cls): |
| 140 return 'page_cycler_v2.intl_ja_zh' | 140 return 'page_cycler_v2.intl_ja_zh' |
| 141 | 141 |
| 142 def CreateStorySet(self, options): | 142 def CreateStorySet(self, options): |
| 143 return page_sets.IntlJaZhPageSet(cache_temperatures=[ | 143 return page_sets.IntlJaZhPageSet(cache_temperatures=[ |
| 144 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) | 144 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) |
| 145 | 145 |
| 146 | 146 |
| 147 class PageCyclerV2IntlKoThVi(_PageCyclerV2): | 147 class PageCyclerV2IntlKoThVi(PageCyclerV2): |
| 148 """Page load time for a variety of pages in Korean, Thai and Vietnamese. | 148 """Page load time for a variety of pages in Korean, Thai and Vietnamese. |
| 149 | 149 |
| 150 Runs against pages recorded in April, 2013. | 150 Runs against pages recorded in April, 2013. |
| 151 """ | 151 """ |
| 152 page_set = page_sets.IntlKoThViPageSet | 152 page_set = page_sets.IntlKoThViPageSet |
| 153 | 153 |
| 154 @classmethod | 154 @classmethod |
| 155 def Name(cls): | 155 def Name(cls): |
| 156 return 'page_cycler_v2.intl_ko_th_vi' | 156 return 'page_cycler_v2.intl_ko_th_vi' |
| 157 | 157 |
| 158 def CreateStorySet(self, options): | 158 def CreateStorySet(self, options): |
| 159 return page_sets.IntlKoThViPageSet(cache_temperatures=[ | 159 return page_sets.IntlKoThViPageSet(cache_temperatures=[ |
| 160 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) | 160 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) |
| 161 | 161 |
| 162 | 162 |
| 163 class PageCyclerV2Top10Mobile(_PageCyclerV2): | 163 class PageCyclerV2Top10Mobile(PageCyclerV2): |
| 164 """Page load time benchmark for the top 10 mobile web pages. | 164 """Page load time benchmark for the top 10 mobile web pages. |
| 165 | 165 |
| 166 Runs against pages recorded in November, 2013. | 166 Runs against pages recorded in November, 2013. |
| 167 """ | 167 """ |
| 168 | 168 |
| 169 @classmethod | 169 @classmethod |
| 170 def Name(cls): | 170 def Name(cls): |
| 171 return 'page_cycler_v2.top_10_mobile' | 171 return 'page_cycler_v2.top_10_mobile' |
| 172 | 172 |
| 173 def CreateStorySet(self, options): | 173 def CreateStorySet(self, options): |
| 174 return page_sets.Top10MobilePageSet(run_no_page_interactions=True, | 174 return page_sets.Top10MobilePageSet(run_no_page_interactions=True, |
| 175 cache_temperatures=[ | 175 cache_temperatures=[ |
| 176 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) | 176 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) |
| 177 | 177 |
| 178 | 178 |
| 179 class PageCyclerV2ToughLayoutCases(_PageCyclerV2): | 179 class PageCyclerV2ToughLayoutCases(PageCyclerV2): |
| 180 """Page loading for the slowest layouts observed in the Alexa top 1 million. | 180 """Page loading for the slowest layouts observed in the Alexa top 1 million. |
| 181 | 181 |
| 182 Recorded in July 2013. | 182 Recorded in July 2013. |
| 183 """ | 183 """ |
| 184 page_set = page_sets.ToughLayoutCasesPageSet | 184 page_set = page_sets.ToughLayoutCasesPageSet |
| 185 | 185 |
| 186 @classmethod | 186 @classmethod |
| 187 def Name(cls): | 187 def Name(cls): |
| 188 return 'page_cycler_v2.tough_layout_cases' | 188 return 'page_cycler_v2.tough_layout_cases' |
| 189 | 189 |
| 190 def CreateStorySet(self, options): | 190 def CreateStorySet(self, options): |
| 191 return page_sets.ToughLayoutCasesPageSet(cache_temperatures=[ | 191 return page_sets.ToughLayoutCasesPageSet(cache_temperatures=[ |
| 192 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) | 192 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) |
| 193 | 193 |
| 194 | 194 |
| 195 @benchmark.Disabled('reference', 'android') | 195 @benchmark.Disabled('reference', 'android') |
| 196 class PageCyclerV2BasicOopifIsolated(_PageCyclerV2): | 196 class PageCyclerV2BasicOopifIsolated(PageCyclerV2): |
| 197 """ A benchmark measuring performance of out-of-process iframes. """ | 197 """ A benchmark measuring performance of out-of-process iframes. """ |
| 198 page_set = page_sets.OopifBasicPageSet | 198 page_set = page_sets.OopifBasicPageSet |
| 199 | 199 |
| 200 @classmethod | 200 @classmethod |
| 201 def Name(cls): | 201 def Name(cls): |
| 202 return 'page_cycler_v2_site_isolation.basic_oopif' | 202 return 'page_cycler_v2_site_isolation.basic_oopif' |
| 203 | 203 |
| 204 def SetExtraBrowserOptions(self, options): | 204 def SetExtraBrowserOptions(self, options): |
| 205 options.AppendExtraBrowserArgs(['--site-per-process']) | 205 options.AppendExtraBrowserArgs(['--site-per-process']) |
| 206 | 206 |
| 207 def CreateStorySet(self, options): | 207 def CreateStorySet(self, options): |
| 208 return page_sets.OopifBasicPageSet(cache_temperatures=[ | 208 return page_sets.OopifBasicPageSet(cache_temperatures=[ |
| 209 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) | 209 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) |
| 210 | 210 |
| 211 | 211 |
| 212 class PageCyclerV2BasicOopif(_PageCyclerV2): | 212 class PageCyclerV2BasicOopif(PageCyclerV2): |
| 213 """ A benchmark measuring performance of the out-of-process iframes page | 213 """ A benchmark measuring performance of the out-of-process iframes page |
| 214 set, without running in out-of-process iframes mode.. """ | 214 set, without running in out-of-process iframes mode.. """ |
| 215 page_set = page_sets.OopifBasicPageSet | 215 page_set = page_sets.OopifBasicPageSet |
| 216 | 216 |
| 217 @classmethod | 217 @classmethod |
| 218 def Name(cls): | 218 def Name(cls): |
| 219 return 'page_cycler_v2.basic_oopif' | 219 return 'page_cycler_v2.basic_oopif' |
| 220 | 220 |
| 221 def CreateStorySet(self, options): | 221 def CreateStorySet(self, options): |
| 222 return page_sets.OopifBasicPageSet(cache_temperatures=[ | 222 return page_sets.OopifBasicPageSet(cache_temperatures=[ |
| 223 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) | 223 cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) |
| OLD | NEW |