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

Side by Side Diff: tools/perf/measurements/startup.py

Issue 192613002: [Telemetry] rename _needs_browser_restart_after_each_run -> <...>_each_page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from metrics import startup_metric 5 from metrics import startup_metric
6 from telemetry.page import page_measurement 6 from telemetry.page import page_measurement
7 7
8 8
9 class Startup(page_measurement.PageMeasurement): 9 class Startup(page_measurement.PageMeasurement):
10 """Performs a measurement of Chromium's startup performance. 10 """Performs a measurement of Chromium's startup performance.
11 11
12 This test must be invoked with either --warm or --cold on the command line. A 12 This test must be invoked with either --warm or --cold on the command line. A
13 cold start means none of the Chromium files are in the disk cache. A warm 13 cold start means none of the Chromium files are in the disk cache. A warm
14 start assumes the OS has already cached much of Chromium's content. For warm 14 start assumes the OS has already cached much of Chromium's content. For warm
15 tests, you should repeat the page set to ensure it's cached. 15 tests, you should repeat the page set to ensure it's cached.
16 """ 16 """
17 17
18 def __init__(self, action_name_to_run = ''): 18 def __init__(self, action_name_to_run = ''):
19 super(Startup, self).__init__(needs_browser_restart_after_each_run=True, 19 super(Startup, self).__init__(needs_browser_restart_after_each_page=True,
20 action_name_to_run=action_name_to_run) 20 action_name_to_run=action_name_to_run)
21 21
22 def AddCommandLineOptions(self, parser): 22 def AddCommandLineOptions(self, parser):
23 parser.add_option('--cold', action='store_true', 23 parser.add_option('--cold', action='store_true',
24 help='Clear the OS disk cache before performing the test') 24 help='Clear the OS disk cache before performing the test')
25 parser.add_option('--warm', action='store_true', 25 parser.add_option('--warm', action='store_true',
26 help='Start up with everything already cached') 26 help='Start up with everything already cached')
27 27
28 def CustomizeBrowserOptions(self, options): 28 def CustomizeBrowserOptions(self, options):
29 # TODO: Once the bots start running benchmarks, enforce that either --warm 29 # TODO: Once the bots start running benchmarks, enforce that either --warm
(...skipping 25 matching lines...) Expand all
55 cold start means none of the Chromium files are in the disk cache. A warm 55 cold start means none of the Chromium files are in the disk cache. A warm
56 start assumes the OS has already cached much of Chromium's content. For warm 56 start assumes the OS has already cached much of Chromium's content. For warm
57 tests, you should repeat the page set to ensure it's cached. 57 tests, you should repeat the page set to ensure it's cached.
58 58
59 The startup URL is taken from the page set's set_startup_url action. This 59 The startup URL is taken from the page set's set_startup_url action. This
60 allows the testing of multiple different URLs in a single benchmark. 60 allows the testing of multiple different URLs in a single benchmark.
61 """ 61 """
62 62
63 def __init__(self): 63 def __init__(self):
64 super(StartWithUrl, self).__init__(action_name_to_run='navigate_steps') 64 super(StartWithUrl, self).__init__(action_name_to_run='navigate_steps')
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/gpu_process.py ('k') | tools/telemetry/telemetry/page/page_measurement.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698