| OLD | NEW |
| 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.page import page_set | 11 from telemetry.page import page_set |
| 11 from telemetry.page import page_test | 12 from telemetry.page import page_test |
| 12 from telemetry.value import list_of_scalar_values | 13 from telemetry.value import list_of_scalar_values |
| 13 | 14 |
| 14 | 15 |
| 15 _URL = 'http://www.webkit.org/perf/sunspider-1.0.2/sunspider-1.0.2/driver.html' | 16 _URL = 'http://www.webkit.org/perf/sunspider-1.0.2/sunspider-1.0.2/driver.html' |
| 16 | 17 |
| 17 DESCRIPTIONS = { | 18 DESCRIPTIONS = { |
| 18 '3d-cube': | 19 '3d-cube': |
| 19 'Pure JavaScript computations of the kind you might use to do 3d ' | 20 'Pure JavaScript computations of the kind you might use to do 3d ' |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 description='Totals of run time for each different type of benchmark ' | 123 description='Totals of run time for each different type of benchmark ' |
| 123 'in sunspider')) | 124 'in sunspider')) |
| 124 | 125 |
| 125 | 126 |
| 126 class Sunspider(benchmark.Benchmark): | 127 class Sunspider(benchmark.Benchmark): |
| 127 """Apple's SunSpider JavaScript benchmark.""" | 128 """Apple's SunSpider JavaScript benchmark.""" |
| 128 test = _SunspiderMeasurement | 129 test = _SunspiderMeasurement |
| 129 | 130 |
| 130 def CreatePageSet(self, options): | 131 def CreatePageSet(self, options): |
| 131 ps = page_set.PageSet( | 132 ps = page_set.PageSet( |
| 132 archive_data_file='../page_sets/data/sunspider.json', | 133 archive_data_file='../page_sets/data/sunspider.json', |
| 133 make_javascript_deterministic=False, | 134 make_javascript_deterministic=False, |
| 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.AddPageWithDefaultRunNavigate(_URL) | 137 ps.AddUserStory(page_module.Page(_URL, ps, ps.base_dir)) |
| 137 return ps | 138 return ps |
| OLD | NEW |