Index: tools/perf/measurements/startup.py |
diff --git a/tools/perf/measurements/startup.py b/tools/perf/measurements/startup.py |
index be0c9711de569132ffed55572791f27a2eabb945..c9bb6b30a9dacc39e1ca465e70648b3ba982e60c 100644 |
--- a/tools/perf/measurements/startup.py |
+++ b/tools/perf/measurements/startup.py |
@@ -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') |