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

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

Issue 24064002: Move clear_system_cache_for_browser_and_profile_on_start to BrowserOptions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/browser.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import json 5 import json
6 6
7 from telemetry.page import page_measurement 7 from telemetry.page import page_measurement
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.
(...skipping 18 matching lines...) Expand all
29 help='Clear the OS disk cache before performing the test') 29 help='Clear the OS disk cache before performing the test')
30 parser.add_option('--warm', action='store_true', 30 parser.add_option('--warm', action='store_true',
31 help='Start up with everything already cached') 31 help='Start up with everything already cached')
32 32
33 def CustomizeBrowserOptions(self, options): 33 def CustomizeBrowserOptions(self, options):
34 # TODO: Once the bots start running benchmarks, enforce that either --warm 34 # TODO: Once the bots start running benchmarks, enforce that either --warm
35 # or --cold is explicitly specified. 35 # or --cold is explicitly specified.
36 # assert options.warm != options.cold, \ 36 # assert options.warm != options.cold, \
37 # "You must specify either --warm or --cold" 37 # "You must specify either --warm or --cold"
38 if options.cold: 38 if options.cold:
39 options.clear_sytem_cache_for_browser_and_profile_on_start = True 39 browser_options = options.browser_options
40 browser_options.clear_sytem_cache_for_browser_and_profile_on_start = True
40 else: 41 else:
41 self.discard_first_result = True 42 self.discard_first_result = True
42 43
43 options.AppendExtraBrowserArgs([ 44 options.AppendExtraBrowserArgs([
44 '--enable-stats-collection-bindings', 45 '--enable-stats-collection-bindings',
45 46
46 # Old commandline flags used for reference builds. 47 # Old commandline flags used for reference builds.
47 '--dom-automation', 48 '--dom-automation',
48 '--reduce-security-for-dom-automation-tests' 49 '--reduce-security-for-dom-automation-tests'
49 ]) 50 ])
(...skipping 13 matching lines...) Expand all
63 64
64 if 'sum' in result: 65 if 'sum' in result:
65 # For all the histograms logged here, there's a single entry so sum 66 # For all the histograms logged here, there's a single entry so sum
66 # is the exact value for that entry. 67 # is the exact value for that entry.
67 measured_time = result['sum'] 68 measured_time = result['sum']
68 elif 'buckets' in result: 69 elif 'buckets' in result:
69 measured_time = \ 70 measured_time = \
70 (result['buckets'][0]['high'] + result['buckets'][0]['low']) / 2 71 (result['buckets'][0]['high'] + result['buckets'][0]['low']) / 2
71 72
72 results.Add(display_name, 'ms', measured_time) 73 results.Add(display_name, 'ms', measured_time)
OLDNEW
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/browser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698