Commit f45d4eb1 authored by Camillo Bruni's avatar Camillo Bruni Committed by Commit Bot

Add year tags to all system health stories

Bug: 878390
Change-Id: Idbf6ea53989688e675718c76babe259caf51c9db
Reviewed-on: https://chromium-review.googlesource.com/1215946
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: default avatarAnnie Sullivan <sullivan@chromium.org>
Reviewed-by: default avatarTimothy Dresser <tdresser@chromium.org>
Reviewed-by: default avatarNed Nguyen <nednguyen@google.com>
Cr-Commit-Position: refs/heads/master@{#590220}
parent d8d47153
......@@ -58,18 +58,18 @@ start_with_url.cold.startup_pages,"pasko@chromium.org, chrome-android-perf-statu
start_with_url.warm.startup_pages,"pasko@chromium.org, chrome-android-perf-status@chromium.org",,,
startup.mobile,"pasko@chromium.org, chrome-android-perf-status@chromium.org",,,
supersize_archive,agrieve@chromium.org,,,
system_health.common_desktop,"charliea@chromium.org, sullivan@chromium.org, tdresser@chromium.org, chrome-speed-metrics-dev@chromium.org",Speed>Metrics>SystemHealthRegressions,https://bit.ly/system-health-benchmarks,"accessibility,emerging_market,health_check,infinite_scroll,international,javascript_heavy,keyboard_input,scroll,tabs_switching,webgl"
system_health.common_mobile,"charliea@chromium.org, sullivan@chromium.org, tdresser@chromium.org, perezju@chromium.org, chrome-speed-metrics-dev@chromium.org",Speed>Metrics>SystemHealthRegressions,https://bit.ly/system-health-benchmarks,"emerging_market,health_check,infinite_scroll,international,javascript_heavy"
system_health.memory_desktop,perezju@chromium.org,,https://bit.ly/system-health-benchmarks,"accessibility,emerging_market,health_check,infinite_scroll,international,javascript_heavy,keyboard_input,scroll,tabs_switching,webgl"
system_health.memory_mobile,perezju@chromium.org,,https://bit.ly/system-health-benchmarks,"emerging_market,health_check,infinite_scroll,international,javascript_heavy"
system_health.webview_startup,"perezju@chromium.org, torne@chromium.org, changwan@chromium.org",Mobile>WebView>Perf,,health_check
tab_switching.typical_25,vovoy@chromium.org,OS>Performance,,tabs_switching
system_health.common_desktop,"charliea@chromium.org, sullivan@chromium.org, tdresser@chromium.org, chrome-speed-metrics-dev@chromium.org",Speed>Metrics>SystemHealthRegressions,https://bit.ly/system-health-benchmarks,"2016,2018,accessibility,emerging_market,health_check,infinite_scroll,international,javascript_heavy,keyboard_input,scroll,tabs_switching,webgl"
system_health.common_mobile,"charliea@chromium.org, sullivan@chromium.org, tdresser@chromium.org, perezju@chromium.org, chrome-speed-metrics-dev@chromium.org",Speed>Metrics>SystemHealthRegressions,https://bit.ly/system-health-benchmarks,"2016,2018,emerging_market,health_check,infinite_scroll,international,javascript_heavy"
system_health.memory_desktop,perezju@chromium.org,,https://bit.ly/system-health-benchmarks,"2016,2018,accessibility,emerging_market,health_check,infinite_scroll,international,javascript_heavy,keyboard_input,scroll,tabs_switching,webgl"
system_health.memory_mobile,perezju@chromium.org,,https://bit.ly/system-health-benchmarks,"2016,2018,emerging_market,health_check,infinite_scroll,international,javascript_heavy"
system_health.webview_startup,"perezju@chromium.org, torne@chromium.org, changwan@chromium.org",Mobile>WebView>Perf,,"2016,health_check"
tab_switching.typical_25,vovoy@chromium.org,OS>Performance,,"2016,tabs_switching"
tracing.tracing_with_background_memory_infra,ssid@chromium.org,,,
tracing_perftests,"kkraynov@chromium.org, primiano@chromium.org",,,
v8.browsing_desktop,"mythria@chromium.org, ulan@chromium.org",,,"health_check,infinite_scroll,international,javascript_heavy,webgl"
v8.browsing_desktop-future,"mythria@chromium.org, ulan@chromium.org",,,"health_check,infinite_scroll,international,javascript_heavy,webgl"
v8.browsing_mobile,"mythria@chromium.org, ulan@chromium.org",,,"emerging_market,health_check,infinite_scroll,international,javascript_heavy"
v8.browsing_mobile-future,"mythria@chromium.org, ulan@chromium.org",,,"emerging_market,health_check,infinite_scroll,international,javascript_heavy"
v8.browsing_desktop,"mythria@chromium.org, ulan@chromium.org",,,"2016,2018,health_check,infinite_scroll,international,javascript_heavy,webgl"
v8.browsing_desktop-future,"mythria@chromium.org, ulan@chromium.org",,,"2016,2018,health_check,infinite_scroll,international,javascript_heavy,webgl"
v8.browsing_mobile,"mythria@chromium.org, ulan@chromium.org",,,"2016,2018,emerging_market,health_check,infinite_scroll,international,javascript_heavy"
v8.browsing_mobile-future,"mythria@chromium.org, ulan@chromium.org",,,"2016,2018,emerging_market,health_check,infinite_scroll,international,javascript_heavy"
v8.runtime_stats.top_25,cbruni@chromium.org,,,"cold,hot,warm"
validating_command_buffer_perftests,"piman@chromium.org, chrome-gpu-perf-owners@chromium.org",Internals>GPU,,
views_perftests,tapted@chromium.org,Internals>Views,,
......
......@@ -27,7 +27,7 @@ class AccessibilityScrollingCodeSearchStory(_AccessibilityStory):
"""Tests scrolling an element within a page."""
NAME = 'browse_accessibility:tech:codesearch'
URL = 'https://cs.chromium.org/chromium/src/ui/accessibility/platform/ax_platform_node_mac.mm'
TAGS = [story_tags.ACCESSIBILITY, story_tags.SCROLL]
TAGS = [story_tags.ACCESSIBILITY, story_tags.SCROLL, story_tags.YEAR_2016]
def RunNavigateSteps(self, action_runner):
super(AccessibilityScrollingCodeSearchStory, self).RunNavigateSteps(
......@@ -40,7 +40,7 @@ class AccessibilityScrollingCodeSearchStory2018(_AccessibilityStory):
"""Tests scrolling an element within a page."""
NAME = 'browse_accessibility:tech:codesearch:2018'
URL = 'https://cs.chromium.org/chromium/src/ui/accessibility/platform/ax_platform_node_mac.mm'
TAGS = [story_tags.ACCESSIBILITY, story_tags.SCROLL]
TAGS = [story_tags.ACCESSIBILITY, story_tags.SCROLL, story_tags.YEAR_2018]
def RunNavigateSteps(self, action_runner):
super(AccessibilityScrollingCodeSearchStory2018, self).RunNavigateSteps(
......@@ -54,21 +54,22 @@ class AccessibilityWikipediaStory(_AccessibilityStory):
"""Wikipedia page on Accessibility. Long, but very simple, clean layout."""
NAME = 'load_accessibility:media:wikipedia'
URL = 'https://en.wikipedia.org/wiki/Accessibility'
TAGS = [story_tags.ACCESSIBILITY]
TAGS = [story_tags.ACCESSIBILITY, story_tags.YEAR_2016]
class AccessibilityAmazonStory(_AccessibilityStory):
"""Amazon results page. Good example of a site with a data table."""
NAME = 'load_accessibility:shopping:amazon'
URL = 'https://www.amazon.com/gp/offer-listing/B01IENFJ14'
TAGS = [story_tags.ACCESSIBILITY]
TAGS = [story_tags.ACCESSIBILITY, story_tags.YEAR_2016]
class AccessibilityYouTubeHomepageStory(_AccessibilityStory):
"""Tests interacting with the YouTube home page."""
NAME = 'browse_accessibility:media:youtube'
URL = 'https://www.youtube.com/'
TAGS = [story_tags.ACCESSIBILITY, story_tags.KEYBOARD_INPUT]
TAGS = [story_tags.ACCESSIBILITY, story_tags.KEYBOARD_INPUT,
story_tags.YEAR_2016]
def RunNavigateSteps(self, action_runner):
action_runner.Navigate('https://www.youtube.com/')
......
......@@ -30,7 +30,7 @@ class _BackgroundStory(system_health_story.SystemHealthStory):
class BackgroundGoogleStory(_BackgroundStory):
NAME = 'background:search:google'
URL = 'https://www.google.co.uk/#q=tom+cruise+movies'
TAGS = [story_tags.HEALTH_CHECK]
TAGS = [story_tags.HEALTH_CHECK, story_tags.YEAR_2016]
def _DidLoadDocument(self, action_runner):
# Activte the immersive movie browsing experience
......@@ -43,13 +43,14 @@ class BackgroundFacebookMobileStory(_BackgroundStory):
NAME = 'background:social:facebook'
URL = 'https://www.facebook.com/rihanna'
SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
TAGS = [story_tags.YEAR_2016]
class BackgroundNytimesMobileStory(_BackgroundStory):
NAME = 'background:news:nytimes'
URL = 'http://www.nytimes.com/2016/10/04/us/politics/vice-presidential-debate.html?_r=0'
SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
TAGS = [story_tags.JAVASCRIPT_HEAVY]
TAGS = [story_tags.JAVASCRIPT_HEAVY, story_tags.YEAR_2016]
def _DidLoadDocument(self, action_runner):
# Dismiss the 'You have n free articles' message.
......@@ -80,13 +81,13 @@ class BackgroundImgurMobileStory(_BackgroundStory):
NAME = 'background:media:imgur'
URL = 'http://imgur.com/gallery/hUita'
SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
TAGS = [story_tags.HEALTH_CHECK]
TAGS = [story_tags.HEALTH_CHECK, story_tags.YEAR_2016]
class BackgroundGmailMobileStory(LoadGmailMobileStory):
NAME = 'background:tools:gmail'
SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
TAGS = [story_tags.HEALTH_CHECK]
TAGS = [story_tags.HEALTH_CHECK, story_tags.YEAR_2016]
def _Measure(self, action_runner):
action_runner.tab.browser.Background()
......
......@@ -13,7 +13,7 @@ class BlankAboutBlankStory(system_health_story.SystemHealthStory):
"""Story that loads the about:blank page."""
NAME = 'load:chrome:blank'
URL = 'about:blank'
TAGS = [story_tags.HEALTH_CHECK]
TAGS = [story_tags.HEALTH_CHECK, story_tags.YEAR_2016]
def _DidLoadDocument(self, action_runner):
# Request a RAF and wait for it to be processed to ensure that the metric
......@@ -38,7 +38,7 @@ class SearchOmniboxStory(system_health_story.SystemHealthStory):
NAME = 'browse:chrome:omnibox'
URL = 'https://www.google.co.in'
SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
TAGS = [story_tags.EMERGING_MARKET]
TAGS = [story_tags.EMERGING_MARKET, story_tags.YEAR_2016]
# WebView has no omnibox, so not supported.
WEBVIEW_NOT_SUPPORTED = True
......@@ -74,7 +74,7 @@ class MobileNewTabPageStory(system_health_story.SystemHealthStory):
'how to tie a tie']
SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
TAGS = [story_tags.EMERGING_MARKET]
TAGS = [story_tags.EMERGING_MARKET, story_tags.YEAR_2016]
# WebView has no tabs, so this story is not supported there.
WEBVIEW_NOT_SUPPORTED = True
......
......@@ -4,6 +4,7 @@
from page_sets.login_helpers import google_login
from page_sets.system_health import platforms
from page_sets.system_health import story_tags
from page_sets.system_health import system_health_story
......@@ -88,15 +89,18 @@ class _LongRunningGmailDesktopBase(_LongRunningGmailBase):
class LongRunningGmailMobileForegroundStory(_LongRunningGmailMobileBase):
NAME = 'long_running:tools:gmail-foreground'
TAGS = [story_tags.YEAR_2016]
class LongRunningGmailDesktopForegroundStory(_LongRunningGmailDesktopBase):
NAME = 'long_running:tools:gmail-foreground'
TAGS = [story_tags.YEAR_2016]
class LongRunningGmailMobileBackgroundStory(_LongRunningGmailMobileBase):
BACKGROUND = True
NAME = 'long_running:tools:gmail-background'
TAGS = [story_tags.YEAR_2016]
# This runs a gmail story in a background tab, and tabs aren't supported
# on WebView.
WEBVIEW_NOT_SUPPORTED = True
......@@ -105,3 +109,4 @@ class LongRunningGmailMobileBackgroundStory(_LongRunningGmailMobileBase):
class LongRunningGmailDesktopBackgroundStory(_LongRunningGmailDesktopBase):
BACKGROUND = True
NAME = 'long_running:tools:gmail-background'
TAGS = [story_tags.YEAR_2016]
......@@ -3,6 +3,7 @@
# found in the LICENSE file.
from page_sets.system_health import platforms
from page_sets.system_health import story_tags
from page_sets.system_health import system_health_story
from page_sets.login_helpers import google_login
......@@ -56,6 +57,7 @@ class GooglePlayMusicDesktopStory(_MediaStory):
"""Browse the songs list in music.google.com, then play a song."""
NAME = 'play:media:google_play_music'
URL = 'https://music.google.com'
TAGS = [story_tags.YEAR_2016]
PLAY_SELECTOR = '.x-scope.paper-fab-0'
STOP_SELECTOR = '.style-scope.sj-play-button'
......@@ -80,6 +82,7 @@ class SoundCloudDesktopStory(_MediaStory):
"""Load soundcloud.com, search for "Smooth Jazz", then play a song."""
NAME = 'play:media:soundcloud'
URL = 'https://soundcloud.com'
TAGS = [story_tags.YEAR_2016]
PLAY_SELECTOR = '.sc-button-play.playButton.sc-button.sc-button-xlarge'
STOP_SELECTOR = '.playControl.playControls__icon.sc-ir.playing'
......
......@@ -46,7 +46,7 @@ class MultiTabStory(system_health_story.SystemHealthStory):
class MultiTabTypical24Story(MultiTabStory):
"""Load 24 different web sites in 24 tabs, then cycle through each tab."""
NAME = 'multitab:misc:typical24'
TAGS = [story_tags.TABS_SWITCHING]
TAGS = [story_tags.TABS_SWITCHING, story_tags.YEAR_2016]
URL_LIST = [
# Why: Alexa games #48
'http://www.nick.com/games',
......
......@@ -3,6 +3,7 @@
# found in the LICENSE file.
import collections
import re
Tag = collections.namedtuple('Tag', ['name', 'description'])
......@@ -54,18 +55,36 @@ WEBGL = Tag(
WEB_STORAGE = Tag(
'web_storage', 'Story has sites with heavy uses of Web storage.')
# Tags by year.
YEAR_2016 = Tag(
'2016', 'Story was created or updated in 2016.')
YEAR_2017 = Tag(
'2017', 'Story was created or updated in 2017.')
YEAR_2018 = Tag(
'2018', 'Story was created or updated in 2018.')
YEAR_2019 = Tag(
'2019', 'Story was created or updated in 2019.')
def _ExtractAllTags():
all_tag_names = set()
all_tags = []
all_tags = set()
# Collect all the tags defined in this module. Also assert that there is no
# duplicate tag names.
for obj in globals().values():
if isinstance(obj, Tag):
all_tags.append(obj)
all_tags.add(obj)
assert obj.name not in all_tag_names, 'Duplicate tag name: %s' % obj.name
all_tag_names.add(obj.name)
return all_tags
def _ExtractYearTags():
year_tags = set()
pattern = re.compile('^[0-9]{4}$')
for obj in globals().values():
if isinstance(obj, Tag) and pattern.match(obj.name):
year_tags.add(obj)
return year_tags
ALL_TAGS = _ExtractAllTags()
YEAR_TAGS = _ExtractYearTags()
......@@ -66,9 +66,18 @@ class SystemHealthStory(page.Page):
extra_browser_args=None):
case, group, _ = self.NAME.split(':', 2)
tags = []
found_year_tag = False
for t in self.TAGS: # pylint: disable=not-an-iterable
assert t in story_tags.ALL_TAGS
tags.append(t.name)
if t in story_tags.YEAR_TAGS:
# Assert that this is the first year tag.
assert not found_year_tag, (
"%s has more than one year tag found." % self.__class__.__name__)
found_year_tag = True
# Assert that there is one year tag.
assert found_year_tag, (
"%s needs exactly one year tag." % self.__class__.__name__)
super(SystemHealthStory, self).__init__(
shared_page_state_class=_SystemHealthSharedState,
page_set=story_set, name=self.NAME, url=self.URL, tags=tags,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment