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

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

Issue 450873002: [Telemetry] Fix Octane on non-rooted devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Maintain check when possible Created 6 years, 4 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 2012 The Chromium Authors. All rights reserved. 1 # Copyright 2012 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 """Runs Octane 2.0 javascript benchmark. 5 """Runs Octane 2.0 javascript benchmark.
6 6
7 Octane 2.0 is a modern benchmark that measures a JavaScript engine's performance 7 Octane 2.0 is a modern benchmark that measures a JavaScript engine's performance
8 by running a suite of tests representative of today's complex and demanding web 8 by running a suite of tests representative of today's complex and demanding web
9 applications. Octane's goal is to measure the performance of JavaScript code 9 applications. Octane's goal is to measure the performance of JavaScript code
10 found in large, real-world web applications. 10 found in large, real-world web applications.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 super(_OctaneMeasurement, self).__init__() 69 super(_OctaneMeasurement, self).__init__()
70 self._power_metric = None 70 self._power_metric = None
71 71
72 def CustomizeBrowserOptions(self, options): 72 def CustomizeBrowserOptions(self, options):
73 power.PowerMetric.CustomizeBrowserOptions(options) 73 power.PowerMetric.CustomizeBrowserOptions(options)
74 74
75 def WillStartBrowser(self, browser): 75 def WillStartBrowser(self, browser):
76 self._power_metric = power.PowerMetric(browser) 76 self._power_metric = power.PowerMetric(browser)
77 77
78 def WillNavigateToPage(self, page, tab): 78 def WillNavigateToPage(self, page, tab):
79 if tab.browser.memory_stats['SystemTotalPhysicalMemory'] < 1 * _GB: 79 memory_stats = tab.browser.memory_stats
80 if ('SystemTotalPhysicalMemory' in memory_stats and
81 memory_stats['SystemTotalPhysicalMemory'] < 1 * _GB):
80 skipBenchmarks = '"zlib"' 82 skipBenchmarks = '"zlib"'
81 else: 83 else:
82 skipBenchmarks = '' 84 skipBenchmarks = ''
83 page.script_to_evaluate_on_commit = """ 85 page.script_to_evaluate_on_commit = """
84 var __results = []; 86 var __results = [];
85 var __real_log = window.console.log; 87 var __real_log = window.console.log;
86 window.console.log = function(msg) { 88 window.console.log = function(msg) {
87 __results.push(msg); 89 __results.push(msg);
88 __real_log.apply(this, [msg]); 90 __real_log.apply(this, [msg]);
89 } 91 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 test = _OctaneMeasurement 132 test = _OctaneMeasurement
131 133
132 def CreatePageSet(self, options): 134 def CreatePageSet(self, options):
133 ps = page_set.PageSet( 135 ps = page_set.PageSet(
134 archive_data_file='../page_sets/data/octane.json', 136 archive_data_file='../page_sets/data/octane.json',
135 make_javascript_deterministic=False, 137 make_javascript_deterministic=False,
136 file_path=os.path.abspath(__file__)) 138 file_path=os.path.abspath(__file__))
137 ps.AddPageWithDefaultRunNavigate( 139 ps.AddPageWithDefaultRunNavigate(
138 'http://octane-benchmark.googlecode.com/svn/latest/index.html?auto=1') 140 'http://octane-benchmark.googlecode.com/svn/latest/index.html?auto=1')
139 return ps 141 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