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

Side by Side Diff: tools/perf/benchmarks/speedometer.py

Issue 1064433003: Revert "Trigger clean-up GCs between tests of Speedometer" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 """Apple's Speedometer performance benchmark. 5 """Apple's Speedometer performance benchmark.
6 6
7 Speedometer measures simulated user interactions in web applications. 7 Speedometer measures simulated user interactions in web applications.
8 8
9 The current benchmark uses TodoMVC to simulate user actions for adding, 9 The current benchmark uses TodoMVC to simulate user actions for adding,
10 completing, and removing to-do items. Speedometer repeats the same actions using 10 completing, and removing to-do items. Speedometer repeats the same actions using
(...skipping 25 matching lines...) Expand all
36 'AngularJS-TodoMVC', 36 'AngularJS-TodoMVC',
37 'React-TodoMVC', 37 'React-TodoMVC',
38 'FlightJS-TodoMVC' 38 'FlightJS-TodoMVC'
39 ] 39 ]
40 40
41 def __init__(self): 41 def __init__(self):
42 super(SpeedometerMeasurement, self).__init__() 42 super(SpeedometerMeasurement, self).__init__()
43 43
44 def CustomizeBrowserOptions(self, options): 44 def CustomizeBrowserOptions(self, options):
45 keychain_metric.KeychainMetric.CustomizeBrowserOptions(options) 45 keychain_metric.KeychainMetric.CustomizeBrowserOptions(options)
46 options.AppendExtraBrowserArgs(['--js-flags=--expose_gc'])
47 46
48 def ValidateAndMeasurePage(self, page, tab, results): 47 def ValidateAndMeasurePage(self, page, tab, results):
49 tab.WaitForDocumentReadyStateToBeComplete() 48 tab.WaitForDocumentReadyStateToBeComplete()
50 iterationCount = 10 49 iterationCount = 10
51 # A single iteration on android takes ~75 seconds, the benchmark times out 50 # A single iteration on android takes ~75 seconds, the benchmark times out
52 # when running for 10 iterations. 51 # when running for 10 iterations.
53 if tab.browser.platform.GetOSName() == 'android': 52 if tab.browser.platform.GetOSName() == 'android':
54 iterationCount = 3 53 iterationCount = 3
55 54
56 tab.ExecuteJavaScript(""" 55 tab.ExecuteJavaScript("""
57 // Store all the results in the benchmarkClient 56 // Store all the results in the benchmarkClient
58 benchmarkClient._measuredValues = [] 57 benchmarkClient._measuredValues = []
59 benchmarkClient.didRunSuites = function(measuredValues) { 58 benchmarkClient.didRunSuites = function(measuredValues) {
60 benchmarkClient._measuredValues.push(measuredValues); 59 benchmarkClient._measuredValues.push(measuredValues);
61 benchmarkClient._timeValues.push(measuredValues.total); 60 benchmarkClient._timeValues.push(measuredValues.total);
62 }; 61 };
63 benchmarkClient.willRunTest = function(suite, test) {
64 for (var i = 0; i < 5; i++) {
65 gc();
66 }
67 };
68 benchmarkClient.iterationCount = %d; 62 benchmarkClient.iterationCount = %d;
69 startTest(); 63 startTest();
70 """ % iterationCount) 64 """ % iterationCount)
71 tab.WaitForJavaScriptExpression( 65 tab.WaitForJavaScriptExpression(
72 'benchmarkClient._finishedTestCount == benchmarkClient.testsCount', 600) 66 'benchmarkClient._finishedTestCount == benchmarkClient.testsCount', 600)
73 results.AddValue(list_of_scalar_values.ListOfScalarValues( 67 results.AddValue(list_of_scalar_values.ListOfScalarValues(
74 page, 'Total', 'ms', 68 page, 'Total', 'ms',
75 tab.EvaluateJavaScript('benchmarkClient._timeValues'), important=True)) 69 tab.EvaluateJavaScript('benchmarkClient._timeValues'), important=True))
76 70
77 # Extract the timings for each suite 71 # Extract the timings for each suite
(...skipping 19 matching lines...) Expand all
97 91
98 def CreatePageSet(self, options): 92 def CreatePageSet(self, options):
99 ps = page_set.PageSet( 93 ps = page_set.PageSet(
100 file_path=os.path.abspath(__file__), 94 file_path=os.path.abspath(__file__),
101 archive_data_file='../page_sets/data/speedometer.json', 95 archive_data_file='../page_sets/data/speedometer.json',
102 bucket=page_set.PUBLIC_BUCKET) 96 bucket=page_set.PUBLIC_BUCKET)
103 ps.AddUserStory(page_module.Page( 97 ps.AddUserStory(page_module.Page(
104 'http://browserbench.org/Speedometer/', ps, ps.base_dir, 98 'http://browserbench.org/Speedometer/', ps, ps.base_dir,
105 make_javascript_deterministic=False)) 99 make_javascript_deterministic=False))
106 return ps 100 return ps
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698