Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1069)

Unified Diff: tools/perf/measurements/startup.py

Issue 737403002: Revert of telemetry: Remove command line args from page test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/perf/measurements/smoothness_unittest.py ('k') | tools/perf/measurements/thread_times.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/measurements/startup.py
diff --git a/tools/perf/measurements/startup.py b/tools/perf/measurements/startup.py
index bc0617d593f6e07930fdcf87fba1d247b7a3b6ad..6d26ee92a1a1b00e43ea42752d15bb2a18366dd9 100644
--- a/tools/perf/measurements/startup.py
+++ b/tools/perf/measurements/startup.py
@@ -9,16 +9,30 @@
class Startup(page_test.PageTest):
"""Performs a measurement of Chromium's startup performance.
- Uses cold start if cold==True, otherwise uses warm start. 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.
+ 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.
"""
- def __init__(self, cold=False, action_name_to_run=''):
+ def __init__(self, action_name_to_run = ''):
super(Startup, self).__init__(needs_browser_restart_after_each_page=True,
action_name_to_run=action_name_to_run)
- self._cold = cold
+
+ @classmethod
+ def AddCommandLineArgs(cls, parser):
+ parser.add_option('--cold', action='store_true',
+ help='Clear the OS disk cache before performing the test')
+ parser.add_option('--warm', action='store_true',
+ help='Start up with everything already cached')
+
+ @classmethod
+ def ProcessCommandLineArgs(cls, parser, args):
+ cls._cold = args.cold
+ # TODO: Once the bots start running benchmarks, enforce that either --warm
+ # or --cold is explicitly specified.
+ # if args.warm == args.cold:
+ # parser.error('You must specify either --warm or --cold')
def CustomizeBrowserOptions(self, options):
if self._cold:
@@ -41,15 +55,14 @@
class StartWithUrl(Startup):
"""Performs a measurement of Chromium's performance starting with a URL.
- Uses cold start if cold==True, otherwise uses warm start. 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.
+ 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 startup_url. This
allows the testing of multiple different URLs in a single benchmark.
"""
- def __init__(self, cold=False):
- super(StartWithUrl, self).__init__(cold=cold,
- action_name_to_run='RunNavigateSteps')
+ def __init__(self):
+ super(StartWithUrl, self).__init__(action_name_to_run='RunNavigateSteps')
« no previous file with comments | « tools/perf/measurements/smoothness_unittest.py ('k') | tools/perf/measurements/thread_times.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698