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/sunspider.py

Issue 809393002: Added support for improvement_direction to relevant values, which is propogated to chartjson. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
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 import collections 4 import collections
5 import json 5 import json
6 import os 6 import os
7 7
8 from metrics import power 8 from metrics import power
9 from telemetry import benchmark 9 from telemetry import benchmark
10 from telemetry import page as page_module 10 from telemetry import page as page_module
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 totals = [] 110 totals = []
111 for result in js_results: 111 for result in js_results:
112 total = 0 112 total = 0
113 for key, value in result.iteritems(): 113 for key, value in result.iteritems():
114 r[key].append(value) 114 r[key].append(value)
115 total += value 115 total += value
116 totals.append(total) 116 totals.append(total)
117 for key, values in r.iteritems(): 117 for key, values in r.iteritems():
118 results.AddValue(list_of_scalar_values.ListOfScalarValues( 118 results.AddValue(list_of_scalar_values.ListOfScalarValues(
119 results.current_page, key, 'ms', values, important=False, 119 results.current_page, key, 'ms', values, important=False,
120 description=DESCRIPTIONS.get(key))) 120 description=DESCRIPTIONS.get(key), higher_is_better=False))
121 results.AddValue(list_of_scalar_values.ListOfScalarValues( 121 results.AddValue(list_of_scalar_values.ListOfScalarValues(
122 results.current_page, 'Total', 'ms', totals, 122 results.current_page, 'Total', 'ms', totals,
123 description='Totals of run time for each different type of benchmark ' 123 description='Totals of run time for each different type of benchmark '
124 'in sunspider')) 124 'in sunspider',
125 higher_is_better=False))
125 126
126 127
127 class Sunspider(benchmark.Benchmark): 128 class Sunspider(benchmark.Benchmark):
128 """Apple's SunSpider JavaScript benchmark.""" 129 """Apple's SunSpider JavaScript benchmark."""
129 test = _SunspiderMeasurement 130 test = _SunspiderMeasurement
130 131
131 def CreatePageSet(self, options): 132 def CreatePageSet(self, options):
132 ps = page_set.PageSet( 133 ps = page_set.PageSet(
133 archive_data_file='../page_sets/data/sunspider.json', 134 archive_data_file='../page_sets/data/sunspider.json',
134 file_path=os.path.abspath(__file__), 135 file_path=os.path.abspath(__file__),
135 bucket=page_set.PARTNER_BUCKET) 136 bucket=page_set.PARTNER_BUCKET)
136 ps.AddUserStory(page_module.Page( 137 ps.AddUserStory(page_module.Page(
137 _URL, ps, ps.base_dir, make_javascript_deterministic=False)) 138 _URL, ps, ps.base_dir, make_javascript_deterministic=False))
138 return ps 139 return ps
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698