| OLD | NEW |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 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 test | 9 from telemetry import test |
| 10 from telemetry.page import page_measurement | 10 from telemetry.page import page_measurement |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 for key, values in r.iteritems(): | 49 for key, values in r.iteritems(): |
| 50 results.Add(key, 'ms', values, data_type='unimportant') | 50 results.Add(key, 'ms', values, data_type='unimportant') |
| 51 results.Add('Total', 'ms', totals) | 51 results.Add('Total', 'ms', totals) |
| 52 | 52 |
| 53 | 53 |
| 54 class Sunspider(test.Test): | 54 class Sunspider(test.Test): |
| 55 """Apple's SunSpider JavaScript benchmark.""" | 55 """Apple's SunSpider JavaScript benchmark.""" |
| 56 test = _SunspiderMeasurement | 56 test = _SunspiderMeasurement |
| 57 | 57 |
| 58 def CreatePageSet(self, options): | 58 def CreatePageSet(self, options): |
| 59 return page_set.PageSet.FromDict( | 59 ps = page_set.PageSet( |
| 60 { | 60 archive_data_file='../page_sets/data/sunspider.json', |
| 61 'archive_data_file': '../page_sets/data/sunspider.json', | 61 make_javascript_deterministic=False, |
| 62 'make_javascript_deterministic': False, | 62 file_path=os.path.abspath(__file__)) |
| 63 'pages': [{ 'url': _URL }], | 63 ps.AddPageWithDefaultRunNavigate(_URL) |
| 64 }, os.path.abspath(__file__)) | 64 return ps |
| OLD | NEW |