| 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 from telemetry.page import page as page_module | 4 from telemetry.page import page as page_module |
| 5 from telemetry import story | 5 from telemetry import story |
| 6 | 6 |
| 7 # Chrome has high idle CPU usage on these sites, even after they have quiesced. |
| 8 SITES = [ |
| 9 # https://bugs.chromium.org/p/chromium/issues/detail?id=638365 |
| 10 'http://www.labradortraininghq.com/labrador-training/how-to-crate-train' |
| 11 '-a-puppy/#How_Long_DoesIt_Take_To_Crate_Train_A_Puppy', |
| 12 |
| 13 # https://bugs.chromium.org/p/chromium/issues/detail?id=505990 |
| 14 'http://abcnews.go.com/', |
| 15 |
| 16 # https://bugs.chromium.org/p/chromium/issues/detail?id=505601 |
| 17 'http://www.slideshare.net/patrickmeenan', |
| 18 |
| 19 # https://bugs.chromium.org/p/chromium/issues/detail?id=505577 |
| 20 'http://tumblr.all-that-is-interesting.com/', |
| 21 |
| 22 # https://bugs.chromium.org/p/chromium/issues/detail?id=505553 |
| 23 'https://instagram.com/cnn/', |
| 24 |
| 25 # https://bugs.chromium.org/p/chromium/issues/detail?id=505544 |
| 26 'http://www.sina.com.cn', |
| 27 |
| 28 # https://bugs.chromium.org/p/chromium/issues/detail?id=505056 |
| 29 'http://bbc.com/news/uk/', |
| 30 |
| 31 # https://bugs.chromium.org/p/chromium/issues/detail?id=505054 |
| 32 'http://www.uol.com.br', |
| 33 |
| 34 # https://bugs.chromium.org/p/chromium/issues/detail?id=505052 |
| 35 'http://www.indiatimes.com', |
| 36 |
| 37 # https://bugs.chromium.org/p/chromium/issues/detail?id=505044 |
| 38 'http://www.w3schools.com/html/default.asp', |
| 39 |
| 40 # https://bugs.chromium.org/p/chromium/issues/detail?id=505002 |
| 41 'http://www.microsoft.com', |
| 42 |
| 43 # https://bugs.chromium.org/p/chromium/issues/detail?id=489936 |
| 44 'http://capitalone.com', |
| 45 |
| 46 # https://bugs.chromium.org/p/chromium/issues/detail?id=481225 |
| 47 'https://twitter.com/katyperry', |
| 48 |
| 49 # https://bugs.chromium.org/p/chromium/issues/detail?id=476158 |
| 50 'http://bgr.com', |
| 51 |
| 52 # https://bugs.chromium.org/p/chromium/issues/detail?id=425474 |
| 53 'http://www.androidpolice.com/2014/10/20/animation-bonanza-android' |
| 54 '-5-0-lollipop-in-gifs/', |
| 55 ] |
| 7 | 56 |
| 8 # TODO(rnephew): Move to seperate file and merge with mac_gpu_sites BasePage. | 57 # TODO(rnephew): Move to seperate file and merge with mac_gpu_sites BasePage. |
| 9 class _BasePage(page_module.Page): | 58 class _BasePage(page_module.Page): |
| 10 def __init__(self, page_set, url, wait_in_seconds): | 59 def __init__(self, page_set, url, wait_in_seconds): |
| 11 super(_BasePage, self).__init__(url=url, page_set=page_set) | 60 super(_BasePage, self).__init__(url=url, page_set=page_set) |
| 12 self._wait_in_seconds = wait_in_seconds | 61 self._wait_in_seconds = wait_in_seconds |
| 13 | 62 |
| 14 def RunPageInteractions(self, action_runner): | 63 def RunPageInteractions(self, action_runner): |
| 15 action_runner.Wait(self._wait_in_seconds) | 64 action_runner.Wait(self._wait_in_seconds) |
| 16 | 65 |
| 17 | 66 |
| 18 class IdleAfterLoadingStories(story.StorySet): | 67 class IdleAfterLoadingStories(story.StorySet): |
| 19 """Historically, Chrome has high CPU usage on these sites after the page has | 68 """Historically, Chrome has high CPU usage on these sites after the page has |
| 20 loaded. These user stories let Chrome idle on the page.""" | 69 loaded. These user stories let Chrome idle on the page.""" |
| 21 | 70 |
| 22 def __init__(self, wait_in_seconds=0): | 71 def __init__(self, wait_in_seconds=0): |
| 23 super(IdleAfterLoadingStories, self).__init__( | 72 super(IdleAfterLoadingStories, self).__init__( |
| 24 archive_data_file='data/idle_after_loading_stories.json', | 73 archive_data_file='data/idle_after_loading_stories.json', |
| 25 cloud_storage_bucket=story.PARTNER_BUCKET) | 74 cloud_storage_bucket=story.PARTNER_BUCKET) |
| 26 | 75 |
| 27 # Chrome has high idle CPU usage on this site, even after its quiesced. | 76 # Chrome has high idle CPU usage on this site, even after its quiesced. |
| 28 # https://crbug.com/638365. | 77 # https://crbug.com/638365. |
| 29 urls = [ | 78 for url in SITES: |
| 30 'http://www.labradortraininghq.com/labrador-training/how-to-crate-train' | |
| 31 '-a-puppy/#How_Long_DoesIt_Take_To_Crate_Train_A_Puppy' | |
| 32 ] | |
| 33 for url in urls: | |
| 34 self.AddStory(_BasePage(self, url, wait_in_seconds)) | 79 self.AddStory(_BasePage(self, url, wait_in_seconds)) |
| OLD | NEW |