| 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 from page_sets import page_cycler_story | 5 from page_sets import page_cycler_story |
| 6 from telemetry.page import cache_temperature as cache_temperature_module | 6 from telemetry.page import cache_temperature as cache_temperature_module |
| 7 from telemetry.page import shared_page_state | 7 from telemetry.page import shared_page_state |
| 8 from telemetry.page import traffic_setting as traffic_setting_module |
| 8 from telemetry import story | 9 from telemetry import story |
| 9 | 10 |
| 10 | 11 |
| 11 class LoadingMobileStorySet(story.StorySet): | 12 class LoadingMobileStorySet(story.StorySet): |
| 12 | 13 |
| 13 """ A collection of tests to measure loading performance of mobile sites. | 14 """ A collection of tests to measure loading performance of mobile sites. |
| 14 | 15 |
| 15 Design doc: https://docs.google.com/document/d/1QKlZIoURAxZk-brrXsKYZl9O8ieqXh
t3ogeF9yLNFCI/edit | 16 Design doc: https://docs.google.com/document/d/1QKlZIoURAxZk-brrXsKYZl9O8ieqXh
t3ogeF9yLNFCI/edit |
| 16 """ | 17 """ |
| 17 | 18 |
| 18 def __init__(self, cache_temperatures=None): | 19 def __init__(self, cache_temperatures=None, traffic_settings=None): |
| 19 super(LoadingMobileStorySet, self).__init__( | 20 super(LoadingMobileStorySet, self).__init__( |
| 20 archive_data_file='data/loading_mobile.json', | 21 archive_data_file='data/loading_mobile.json', |
| 21 cloud_storage_bucket=story.PARTNER_BUCKET) | 22 cloud_storage_bucket=story.PARTNER_BUCKET) |
| 22 | 23 |
| 23 if cache_temperatures is None: | 24 if cache_temperatures is None: |
| 24 cache_temperatures = [cache_temperature_module.ANY] | 25 cache_temperatures = [cache_temperature_module.ANY] |
| 25 | 26 |
| 27 if traffic_settings is None: |
| 28 traffic_settings = [traffic_setting_module.NONE] |
| 29 |
| 26 self.AddStories(['global'], [ | 30 self.AddStories(['global'], [ |
| 27 'https://www.google.com/search?q=flower#q=flower+delivery', | 31 'https://www.google.com/search?q=flower#q=flower+delivery', |
| 28 'https://www.youtube.com/watch?v=MU3YuvNRhVY', | 32 'https://www.youtube.com/watch?v=MU3YuvNRhVY', |
| 29 # pylint: disable=line-too-long | 33 # pylint: disable=line-too-long |
| 30 'https://www.google.co.in/search?q=%E0%A4%AB%E0%A5%82%E0%A4%B2&rct=j#q=%E0
%A4%AB%E0%A5%82%E0%A4%B2+%E0%A4%B5%E0%A4%BF%E0%A4%A4%E0%A4%B0%E0%A4%A3', | 34 'https://www.google.co.in/search?q=%E0%A4%AB%E0%A5%82%E0%A4%B2&rct=j#q=%E0
%A4%AB%E0%A5%82%E0%A4%B2+%E0%A4%B5%E0%A4%BF%E0%A4%A4%E0%A4%B0%E0%A4%A3', |
| 31 'https://www.google.com.br/search?q=flor#q=Entrega+de+flores&start=10', | 35 'https://www.google.com.br/search?q=flor#q=Entrega+de+flores&start=10', |
| 32 # Disabled because of crbug.com/653775 | 36 # Disabled because of crbug.com/653775 |
| 33 # pylint: disable=line-too-long | 37 # pylint: disable=line-too-long |
| 34 # 'https://googleblog.blogspot.jp/2016/02/building-safer-web-for-everyone.
html', | 38 # 'https://googleblog.blogspot.jp/2016/02/building-safer-web-for-everyone.
html', |
| 35 'https://www.google.co.id/#q=pengiriman+bunga', | 39 'https://www.google.co.id/#q=pengiriman+bunga', |
| (...skipping 17 matching lines...) Expand all Loading... |
| 53 'http://xw.qq.com/news/20160803025029/NEW2016080302502901', | 57 'http://xw.qq.com/news/20160803025029/NEW2016080302502901', |
| 54 # pylint: disable=line-too-long | 58 # pylint: disable=line-too-long |
| 55 'http://m.kaskus.co.id/thread/57a03a3214088d91068b4567/inilah-akibat-bersi
kap-overprotektif-terhadap-anak/?ref=homelanding&med=hot_thread', | 59 'http://m.kaskus.co.id/thread/57a03a3214088d91068b4567/inilah-akibat-bersi
kap-overprotektif-terhadap-anak/?ref=homelanding&med=hot_thread', |
| 56 'http://www.dailymotion.com/video/x3d1kj5_fallout-4-review_videogames', | 60 'http://www.dailymotion.com/video/x3d1kj5_fallout-4-review_videogames', |
| 57 'https://mobile.twitter.com/scottjehl/status/760618697727803394', | 61 'https://mobile.twitter.com/scottjehl/status/760618697727803394', |
| 58 'http://m.kapanlagi.com/lirik/artis/anji/kata_siapa/', | 62 'http://m.kapanlagi.com/lirik/artis/anji/kata_siapa/', |
| 59 # pylint: disable=line-too-long | 63 # pylint: disable=line-too-long |
| 60 'http://olx.co.id/iklan/iphone-6s-64-rose-gold-warna-favorite-IDiSdm5.html
#5310a118c3;promoted', | 64 'http://olx.co.id/iklan/iphone-6s-64-rose-gold-warna-favorite-IDiSdm5.html
#5310a118c3;promoted', |
| 61 # pylint: disable=line-too-long | 65 # pylint: disable=line-too-long |
| 62 'http://enquiry.indianrail.gov.in/mntes/MntesServlet?action=MainMenu&subAc
tion=excep&excpType=EC', | 66 'http://enquiry.indianrail.gov.in/mntes/MntesServlet?action=MainMenu&subAc
tion=excep&excpType=EC', |
| 63 ], cache_temperatures) | 67 ], cache_temperatures, traffic_settings) |
| 64 | 68 |
| 65 self.AddStories(['pwa'], [ | 69 self.AddStories(['pwa'], [ |
| 66 # pylint: disable=line-too-long | 70 # pylint: disable=line-too-long |
| 67 'https://www.flipkart.com/big-wing-casuals/p/itmemeageyfn6m9z?lid=LSTSHOEM
EAGURG2PHPW18FTBN&pid=SHOEMEAGURG2PHPW', | 71 'https://www.flipkart.com/big-wing-casuals/p/itmemeageyfn6m9z?lid=LSTSHOEM
EAGURG2PHPW18FTBN&pid=SHOEMEAGURG2PHPW', |
| 68 'https://smp.suumo.jp/mansion/tokyo/sc_104/cond/?moreCond=1', | 72 'https://smp.suumo.jp/mansion/tokyo/sc_104/cond/?moreCond=1', |
| 69 # Disabled because of crbug.com/653775 | 73 # Disabled because of crbug.com/653775 |
| 70 # 'https://airhorner.com', | 74 # 'https://airhorner.com', |
| 71 'https://guitar-tuner.appspot.com', | 75 'https://guitar-tuner.appspot.com', |
| 72 # Disabled because of crbug.com/653775 | 76 # Disabled because of crbug.com/653775 |
| 73 # 'https://busrouter.sg', | 77 # 'https://busrouter.sg', |
| 74 'https://andreasbovens.github.io/inbox-attack/', | 78 'https://andreasbovens.github.io/inbox-attack/', |
| 75 'https://voice-memos.appspot.com', | 79 'https://voice-memos.appspot.com', |
| 76 # Disabled because of crbug.com/653775 | 80 # Disabled because of crbug.com/653775 |
| 77 # 'https://wiki-offline.jakearchibald.com/', | 81 # 'https://wiki-offline.jakearchibald.com/', |
| 78 'https://dev.opera.com/', | 82 'https://dev.opera.com/', |
| 79 'https://www.pokedex.org/', | 83 'https://www.pokedex.org/', |
| 80 'https://2048-opera-pwa.surge.sh/', | 84 'https://2048-opera-pwa.surge.sh/', |
| 81 'https://jakearchibald.github.io/trained-to-thrill/', | 85 'https://jakearchibald.github.io/trained-to-thrill/', |
| 82 'https://townwork.net', | 86 'https://townwork.net', |
| 83 'https://flipboard.com/topic/yoga', | 87 'https://flipboard.com/topic/yoga', |
| 84 ], cache_temperatures) | 88 ], cache_temperatures, traffic_settings) |
| 85 | 89 |
| 86 self.AddStories(['tough_ttfmp'], [ | 90 self.AddStories(['tough_ttfmp'], [ |
| 87 'http://www.localmoxie.com', | 91 'http://www.localmoxie.com', |
| 88 'http://www.dawn.com', | 92 'http://www.dawn.com', |
| 89 'http://www.thairath.co.th', | 93 'http://www.thairath.co.th', |
| 90 'http://www.hashocean.com', | 94 'http://www.hashocean.com', |
| 91 'http://www.163.com', | 95 'http://www.163.com', |
| 92 ], cache_temperatures) | 96 ], cache_temperatures, traffic_settings) |
| 93 | 97 |
| 94 self.AddStories(['easy_ttfmp'], [ | 98 self.AddStories(['easy_ttfmp'], [ |
| 95 'http://www.slideshare.net', | 99 'http://www.slideshare.net', |
| 96 'http://www.bradesco.com.br', | 100 'http://www.bradesco.com.br', |
| 97 'http://www.gsshop.com', | 101 'http://www.gsshop.com', |
| 98 'http://www.sbs.co.kr', | 102 'http://www.sbs.co.kr', |
| 99 'http://www.futura-sciences.com', | 103 'http://www.futura-sciences.com', |
| 100 ], cache_temperatures) | 104 ], cache_temperatures, traffic_settings) |
| 101 | 105 |
| 102 self.AddStories(['tough_tti'], [ | 106 self.AddStories(['tough_tti'], [ |
| 103 'http://www.thestar.com.my', | 107 'http://www.thestar.com.my', |
| 104 'http://www.58pic.com', | 108 'http://www.58pic.com', |
| 105 'http://www.hongkiat.com', | 109 'http://www.hongkiat.com', |
| 106 'http://www.ebs.in', | 110 'http://www.ebs.in', |
| 107 'http://www.ibicn.com', | 111 'http://www.ibicn.com', |
| 108 ], cache_temperatures) | 112 ], cache_temperatures, traffic_settings) |
| 109 | 113 |
| 110 self.AddStories(['easy_tti'], [ | 114 self.AddStories(['easy_tti'], [ |
| 111 'http://www.dramaq.com.tw', | 115 'http://www.dramaq.com.tw', |
| 112 'http://www.locanto.in', | 116 'http://www.locanto.in', |
| 113 'http://www.francetvinfo.fr', | 117 'http://www.francetvinfo.fr', |
| 114 'http://www.gfk.com', | 118 'http://www.gfk.com', |
| 115 'http://www.mlsmatrix.com' | 119 'http://www.mlsmatrix.com' |
| 116 ], cache_temperatures) | 120 ], cache_temperatures, traffic_settings) |
| 117 | 121 |
| 118 def AddStories(self, labels, urls, cache_temperatures): | 122 def AddStories(self, labels, urls, cache_temperatures, traffic_settings): |
| 119 for url in urls: | 123 for url in urls: |
| 120 for temp in cache_temperatures: | 124 for temp in cache_temperatures: |
| 121 self.AddStory(page_cycler_story.PageCyclerStory(url, self, | 125 for traffic in traffic_settings: |
| 122 shared_page_state_class=shared_page_state.SharedMobilePageState, | 126 self.AddStory(page_cycler_story.PageCyclerStory(url, self, |
| 123 cache_temperature=temp, labels=labels)) | 127 shared_page_state_class=shared_page_state.SharedMobilePageState, |
| 128 cache_temperature=temp, traffic_setting=traffic, labels=labels)) |
| OLD | NEW |