Commit 0c11ac6a authored by rnephew's avatar rnephew Committed by Commit bot

Add new long-running memory test for telemetry.

BUG=

Review URL: https://codereview.chromium.org/606853002

Cr-Commit-Position: refs/heads/master@{#299909}
parent 0eb36c82
......@@ -30,3 +30,11 @@ class Reload2012Q3(benchmark.Benchmark):
class MemoryToughDomMemoryCases(benchmark.Benchmark):
test = memory.Memory
page_set = page_sets.ToughDomMemoryCasesPageSet
@benchmark.Enabled('android', 'has tabs')
class TypicalMobileSites(benchmark.Benchmark):
"""Long memory test."""
test = memory.Memory
page_set = page_sets.TypicalMobileSitesPageSet
options = {'pageset_repeat': 15}
{
"description": "Describes the Web Page Replay archives for a page set. Don't edit by hand! Use record_wpr for updating.",
"archives": {
"typical_mobile_sites_000.wpr": [
"http://baidu.com",
"http://sfbay.craigslist.org",
"http://cnn.com",
"http://amazon.co.jp",
"http://latimes.com",
"http://yandex.ru",
"http://wikipedia.com",
"http://yahoo.co.jp",
"http://apple.com",
"http://nytimes.com",
"http://amazon.com",
"http://weibo.com",
"http://ebay.com",
"http://google.com",
"http://bing.com",
"http://bbc.co.uk",
"http://sina.com.cn",
"http://yahoo.com",
"http://chicagotribune.com"
]
}
}
bc8ff193859f5aacaf1215a9b2c0a1a538f8ed72
\ No newline at end of file
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class TypicalMobileSitesPage(page_module.Page):
def __init__(self, url, page_set):
super(TypicalMobileSitesPage, self).__init__(
url=url, page_set=page_set, credentials_path = 'data/credentials.json')
self.user_agent_type = 'mobile'
self.archive_data_file = 'data/typical_mobile_sites.json'
def RunPageInteractions(self, action_runner):
action_runner.Wait(5)
action_runner.ScrollPage()
class TypicalMobileSitesPageSet(page_set_module.PageSet):
def __init__(self):
super(TypicalMobileSitesPageSet, self).__init__(
user_agent_type='mobile',
archive_data_file='data/typical_mobile_sites.json',
bucket=page_set_module.PARTNER_BUCKET)
urls_list = [
'http://google.com',
'http://yahoo.com',
'http://baidu.com',
'http://cnn.com',
'http://yandex.ru',
'http://yahoo.co.jp',
'http://amazon.com',
'http://ebay.com',
'http://bing.com',
'http://nytimes.com',
'http://latimes.com',
'http://chicagotribune.com',
'http://wikipedia.com',
'http://sfbay.craigslist.org',
'http://bbc.co.uk',
'http://apple.com',
'http://amazon.co.jp',
'http://sina.com.cn',
'http://weibo.com',
]
for url in urls_list:
self.AddPage(TypicalMobileSitesPage(url, self))
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