Commit 8bedb98f authored by Benjamin Smith's avatar Benjamin Smith Committed by Commit Bot

[perf] Add Gmail search story

R=tmrts@chromium.org, ulan@chromium.org

Search is a critical user journey for Gmail.

Search inbox for deals.

Bug: 1044682
Change-Id: I0f66c879ab02cfa3332a75576595335a344f9d7b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2247319
Commit-Queue: Benjamin Smith <codesmith@google.com>
Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#782937}
parent 5c8f066d
......@@ -316,6 +316,8 @@ crbug.com/1050068 [ win7 ] system_health.common_desktop/load:media:9gag [ Skip ]
crbug.com/1064281 [ linux ] system_health.common_desktop/long_running:tools:gmail-foreground [ Skip ]
crbug.com/1044682 [ desktop ] system_health.common_desktop/browse:tools:gmail-labelclick:2020 [ Skip ]
crbug.com/1044682 [ desktop ] system_health.common_desktop/browse:tools:gmail-openconversation:2020 [ Skip ]
crbug.com/1044682 [ desktop ] system_health.common_desktop/browse:tools:gmail-search:2020 [ Skip ]
# Benchmark: system_health.common_mobile
crbug.com/1007355 [ android-go android-webview ] system_health.common_mobile/load:media:imgur:2018 [ Skip ]
......@@ -366,6 +368,8 @@ crbug.com/1097065 [ linux ] system_health.memory_desktop/load:social:vk:2018 [ S
crbug.com/1097065 [ linux ] system_health.memory_desktop/browse_accessibility:tech:codesearch:2018 [ Skip ]
crbug.com/1044682 [ desktop ] system_health.memory_desktop/browse:tools:gmail-labelclick:2020 [ Skip ]
crbug.com/1044682 [ desktop ] system_health.memory_desktop/browse:tools:gmail-openconversation:2020 [ Skip ]
crbug.com/1044682 [ desktop ] system_health.memory_desktop/browse:tools:gmail-search:2020 [ Skip ]
# Memory dumps don't work at the moment for Google Earth, see the issue.
crbug.com/1057035 system_health.memory_desktop/browse:tools:earth:2020 [ Skip ]
......
......@@ -130,6 +130,9 @@
"browse:tools:gmail-openconversation:2020": {
"DEFAULT": "system_health_desktop_beed31115c.wprgo"
},
"browse:tools:gmail-search:2020": {
"DEFAULT": "system_health_desktop_b704f9990b.wprgo"
},
"browse:tools:maps": {
"DEFAULT": "system_health_desktop_052.wprgo"
},
......
b704f9990b7c97a761da4955de421689a404e9c6
\ No newline at end of file
......@@ -1329,6 +1329,54 @@ class GmailOpenConversationStory2020(_GmailBrowsingStory):
action_runner.WaitForJavaScriptCondition(self.OPEN_CONVERSATION_BEGIN_EVENT)
action_runner.WaitForJavaScriptCondition(self.OPEN_CONVERSATION_END_EVENT)
class GmailSearchStory2020(_GmailBrowsingStory):
NAME = 'browse:tools:gmail-search:2020'
# Needs to be http and not https.
URL = 'http://mail.google.com/'
SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY
TAGS = [story_tags.YEAR_2020]
SKIP_LOGIN = False
_SEARCH_SELECTOR = 'input[aria-label="Search mail"]'
# Page event queries.
SEARCH_BEGIN_EVENT = '''
(window.__telemetry_observed_page_events.has(
"telemetry:reported_by_page:benchmark_begin"))
'''
SEARCH_END_EVENT = '''
(window.__telemetry_observed_page_events.has(
"telemetry:reported_by_page:benchmark_end"))
'''
# These maps translates page-specific event names to event names needed for
# the reported_by_page:* metric.
EVENTS_AND_MEASURES_REPORTED_BY_PAGE = '''
window.__telemetry_reported_page_events = {
'mail:se-1':
'telemetry:reported_by_page:benchmark_begin',
};
window.__telemetry_reported_page_measures = {
'mail:se':
'telemetry:reported_by_page:benchmark_end'
};
'''
def __init__(self, story_set, take_memory_measurement):
super(GmailSearchStory2020,
self).__init__(story_set, take_memory_measurement,
self.EVENTS_AND_MEASURES_REPORTED_BY_PAGE)
def _DidLoadDocument(self, action_runner):
action_runner.Wait(1)
action_runner.ExecuteJavaScript(
'document.querySelector({{ selector }}).focus()',
selector=self._SEARCH_SELECTOR)
action_runner.EnterText('deals')
action_runner.PressKey('Return')
action_runner.WaitForJavaScriptCondition(self.SEARCH_BEGIN_EVENT)
action_runner.WaitForJavaScriptCondition(self.SEARCH_END_EVENT)
##############################################################################
# Google sheets browsing story.
......
......@@ -51,6 +51,7 @@ browse:tools:docs_scrolling,Google Docs scrolling story:,desktop,"2020,javascrip
browse:tools:earth:2020,Load Google Earth and search for the Empire State Building. Watch the,desktop,"2020,keyboard_input,wasm,webgl"
browse:tools:gmail-labelclick:2020,,desktop,2020
browse:tools:gmail-openconversation:2020,,desktop,2020
browse:tools:gmail-search:2020,,desktop,2020
browse:tools:maps:2019,Google maps story:,"desktop,mobile","2019,emerging_market,health_check,javascript_heavy,webgl"
browse:tools:sheets:2019,,desktop,"2019,health_check,javascript_heavy"
browse_accessibility:media:youtube,Tests interacting with the YouTube home page.,desktop,"2016,accessibility,keyboard_input"
......
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