Commit e23fed23 authored by Yuheng Huang's avatar Yuheng Huang Committed by Commit Bot

Tab Search: Add more stories to tab search benchmark

The following stories are added:
tab_search:close_and_open:2020
tab_search:top10:loading:2020
tab_search:top50:loading:2020
tab_search:top100:loading:2020
Also increase buffer size and remove delay when adding tabs

Bug: 1099917
Change-Id: I08268ff34760775142acdc38d48aa3603f1d4b70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2533236Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Commit-Queue: Yuheng Huang <yuhengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827105}
parent bed87716
......@@ -50,6 +50,8 @@ class TabSearch(perf_benchmark.PerfBenchmark):
options = timeline_based_measurement.Options(category_filter)
options.config.chrome_trace_config.EnableUMAHistograms(
*TAB_SEARCH_BENCHMARK_UMA)
# Add more buffer since we are opening a lot of tabs.
options.config.chrome_trace_config.SetTraceBufferSizeInKb(300 * 1024)
options.SetTimelineBasedMetrics(['webuiMetric', 'umaMetric'])
return options
......
{
"archives": {
"tab_search:close_and_open:2020": {
"DEFAULT": "tab_search_desktop_1b410a96cc.wprgo"
},
"tab_search:top100:2020": {
"DEFAULT": "tab_search_desktop_fecd976705.wprgo"
"DEFAULT": "tab_search_desktop_1b410a96cc.wprgo"
},
"tab_search:top100:loading:2020": {
"DEFAULT": "tab_search_desktop_1b410a96cc.wprgo"
},
"tab_search:top10:2020": {
"DEFAULT": "tab_search_desktop_fecd976705.wprgo"
"DEFAULT": "tab_search_desktop_1b410a96cc.wprgo"
},
"tab_search:top10:loading:2020": {
"DEFAULT": "tab_search_desktop_1b410a96cc.wprgo"
},
"tab_search:top50:2020": {
"DEFAULT": "tab_search_desktop_fecd976705.wprgo"
"DEFAULT": "tab_search_desktop_1b410a96cc.wprgo"
},
"tab_search:top50:loading:2020": {
"DEFAULT": "tab_search_desktop_1b410a96cc.wprgo"
}
},
"description": "Describes the Web Page Replay archives for a story set. Don't edit by hand! Use record_wpr for updating.",
......
1b410a96cc3217182b298676034c73059215e51c
\ No newline at end of file
......@@ -11,6 +11,10 @@ class TabSearchStorySet(story.StorySet):
tab_search_story.TabSearchStoryTop10,
tab_search_story.TabSearchStoryTop50,
tab_search_story.TabSearchStoryTop100,
tab_search_story.TabSearchStoryTop10Loading,
tab_search_story.TabSearchStoryTop50Loading,
tab_search_story.TabSearchStoryTop100Loading,
tab_search_story.TabSearchStoryCloseAndOpen,
]
def __init__(self):
......
......@@ -25,7 +25,7 @@ TOP_URL = [
'live.com',
'microsoft.com',
'espn.com',
'twitch.tv',
'www.indeed.com',
'blogger.com',
'instagram.com',
'mozilla.org',
......@@ -46,7 +46,7 @@ TOP_URL = [
'github.com',
'vimeo.com',
'quizlet.com',
'tmall.com',
'cnbc.com',
'imgur.com',
'wellsfargo.com',
'hulu.com',
......@@ -77,7 +77,6 @@ class TabSearchStory(page.Page):
for url in url_list[1:]:
new_tab = tabs.New()
new_tab.Navigate('https://' + url)
action_runner.Wait(0.2)
if self.WAIT_FOR_NETWORK_QUIESCENCE:
for i, url in enumerate(url_list):
try:
......@@ -173,6 +172,37 @@ class TabSearchStoryTop100(TabSearchStory):
WAIT_FOR_NETWORK_QUIESCENCE = True
class TabSearchStoryTop10Loading(TabSearchStory):
NAME = 'tab_search:top10:loading:2020'
URL_LIST = TOP_URL[:10]
URL = 'https://' + URL_LIST[0]
WAIT_FOR_NETWORK_QUIESCENCE = False
class TabSearchStoryTop50Loading(TabSearchStory):
NAME = 'tab_search:top50:loading:2020'
URL_LIST = TOP_URL[:50]
URL = 'https://' + URL_LIST[0]
WAIT_FOR_NETWORK_QUIESCENCE = False
class TabSearchStoryTop100Loading(TabSearchStory):
NAME = 'tab_search:top100:loading:2020'
URL_LIST = TOP_URL[:50] * 2
URL = 'https://' + URL_LIST[0]
WAIT_FOR_NETWORK_QUIESCENCE = False
class TabSearchStoryCloseAndOpen(TabSearchStory):
NAME = 'tab_search:close_and_open:2020'
URL_LIST = TOP_URL[:10]
URL = 'https://' + URL_LIST[0]
WAIT_FOR_NETWORK_QUIESCENCE = True
def InteractWithPage(self, action_runner):
self.CloseAndOpen(action_runner)
SCROLL_ELEMENT_FUNCTION = '''
document.querySelector('tab-search-app').shadowRoot.getElementById('tabsList')
.shadowRoot.getElementById('container')
......
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