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

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

Issue 385133005: Update jetstream to use results.AddValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 """Runs Apple's JetStream benchmark. 5 """Runs Apple's JetStream benchmark.
6 6
7 JetStream combines a variety of JavaScript benchmarks, covering a variety of 7 JetStream combines a variety of JavaScript benchmarks, covering a variety of
8 advanced workloads and programming techniques, and reports a single score that 8 advanced workloads and programming techniques, and reports a single score that
9 balances them using geometric mean. 9 balances them using geometric mean.
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 tab.WaitForDocumentReadyStateToBeComplete() 54 tab.WaitForDocumentReadyStateToBeComplete()
55 tab.EvaluateJavaScript('JetStream.start()') 55 tab.EvaluateJavaScript('JetStream.start()')
56 tab.WaitForJavaScriptExpression(get_results_js, 600) 56 tab.WaitForJavaScriptExpression(get_results_js, 600)
57 57
58 result = tab.EvaluateJavaScript(get_results_js) 58 result = tab.EvaluateJavaScript(get_results_js)
59 result = json.loads(result.partition(': ')[2]) 59 result = json.loads(result.partition(': ')[2])
60 60
61 all_scores = [] 61 all_scores = []
62 for k, v in result.iteritems(): 62 for k, v in result.iteritems():
63 results.Add(k.replace('.', '_'), 'score', v['result'], 63 results.AddValue(scalar.ScalarValue(
64 data_type='unimportant') 64 results.current_page, k.replace('.', '_'), 'score', v['result'],
65 important=False))
65 # Collect all test scores to compute geometric mean. 66 # Collect all test scores to compute geometric mean.
66 all_scores.extend(v['result']) 67 all_scores.extend(v['result'])
67 total = statistics.GeometricMean(all_scores) 68 total = statistics.GeometricMean(all_scores)
68 results.AddSummaryValue( 69 results.AddSummaryValue(
69 scalar.ScalarValue(None, 'Score', 'score', total)) 70 scalar.ScalarValue(None, 'Score', 'score', total))
70 71
71 72
72 @benchmark.Disabled('android', 'xp') # crbug.com/381742 73 @benchmark.Disabled('android', 'xp') # crbug.com/381742
73 class Jetstream(benchmark.Benchmark): 74 class Jetstream(benchmark.Benchmark):
74 test = _JetstreamMeasurement 75 test = _JetstreamMeasurement
75 76
76 def CreatePageSet(self, options): 77 def CreatePageSet(self, options):
77 ps = page_set.PageSet( 78 ps = page_set.PageSet(
78 archive_data_file='../page_sets/data/jetstream.json', 79 archive_data_file='../page_sets/data/jetstream.json',
79 make_javascript_deterministic=False, 80 make_javascript_deterministic=False,
80 file_path=os.path.abspath(__file__)) 81 file_path=os.path.abspath(__file__))
81 ps.AddPageWithDefaultRunNavigate('http://browserbench.org/JetStream/') 82 ps.AddPageWithDefaultRunNavigate('http://browserbench.org/JetStream/')
82 return ps 83 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