Commit 863f0ef7 authored by dtu@chromium.org's avatar dtu@chromium.org

Restore results of startup tests.

In http://src.chromium.org/viewvc/chrome?view=revision&revision=243849
I accidently caused the startup tests to run the default navigate
step. This reverts this, while still making the start with URL tests
run their navigate steps (which they need to do).

BUG=333052
R=dtu@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244245 0039d316-1c4b-4281-b951-d872f2087c98
parent 8818529e
......@@ -9,7 +9,7 @@ from measurements import startup
class StartWithUrlCold(test.Test):
"""Measure time to start Chrome cold with startup URLs"""
tag = 'cold'
test = startup.Startup
test = startup.StartWithUrl
page_set = 'page_sets/startup_pages.json'
options = {'cold': True,
'pageset_repeat_iters': 5}
......@@ -17,7 +17,7 @@ class StartWithUrlCold(test.Test):
class StartWithUrlWarm(test.Test):
"""Measure time to start Chrome warm with startup URLs"""
tag = 'warm'
test = startup.Startup
test = startup.StartWithUrl
page_set = 'page_sets/startup_pages.json'
options = {'warm': True,
'pageset_repeat_iters': 10}
......
......@@ -15,8 +15,8 @@ class SessionRestore(startup.Startup):
see startup.py for details.
"""
def __init__(self):
super(SessionRestore, self).__init__()
def __init__(self, action_name_to_run = ''):
super(SessionRestore, self).__init__(action_name_to_run=action_name_to_run)
self.close_tabs_before_run = False
self._cpu_metric = None
......
......@@ -8,7 +8,8 @@ from measurements import session_restore
class SessionRestoreWithUrl(session_restore.SessionRestore):
def __init__(self):
super(SessionRestoreWithUrl, self).__init__()
super(SessionRestoreWithUrl, self).__init__(
action_name_to_run='navigate_steps')
def CanRunForPage(self, page):
# Run for every page in the page set that has a startup url.
......
......@@ -14,9 +14,9 @@ class Startup(page_measurement.PageMeasurement):
tests, you should repeat the page set to ensure it's cached.
"""
def __init__(self):
def __init__(self, action_name_to_run = ''):
super(Startup, self).__init__(needs_browser_restart_after_each_run=True,
action_name_to_run='navigate_steps')
action_name_to_run=action_name_to_run)
def AddCommandLineOptions(self, parser):
parser.add_option('--cold', action='store_true',
......@@ -45,3 +45,19 @@ class Startup(page_measurement.PageMeasurement):
def MeasurePage(self, page, tab, results):
startup_metric.StartupMetric().AddResults(tab, results)
class StartWithUrl(Startup):
"""Performs a measurement of Chromium's performance starting with a URL.
This test must be invoked with either --warm or --cold on the command line. A
cold start means none of the Chromium files are in the disk cache. A warm
start assumes the OS has already cached much of Chromium's content. For warm
tests, you should repeat the page set to ensure it's cached.
The startup URL is taken from the page set's set_startup_url action. This
allows the testing of multiple different URLs in a single benchmark.
"""
def __init__(self):
super(StartWithUrl, self).__init__(action_name_to_run='navigate_steps')
\ No newline at end of file
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