OLD | NEW |
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 """Apple's Speedometer performance benchmark. | 5 """Apple's Speedometer performance benchmark. |
6 | 6 |
7 Speedometer measures simulated user interactions in web applications. | 7 Speedometer measures simulated user interactions in web applications. |
8 | 8 |
9 The current benchmark uses TodoMVC to simulate user actions for adding, | 9 The current benchmark uses TodoMVC to simulate user actions for adding, |
10 completing, and removing to-do items. Speedometer repeats the same actions using | 10 completing, and removing to-do items. Speedometer repeats the same actions using |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 for(var i = 0; i < benchmarkClient.iterationCount; i++) { | 73 for(var i = 0; i < benchmarkClient.iterationCount; i++) { |
74 suite_times.push( | 74 suite_times.push( |
75 benchmarkClient._measuredValues[i].tests['%s'].total); | 75 benchmarkClient._measuredValues[i].tests['%s'].total); |
76 }; | 76 }; |
77 suite_times; | 77 suite_times; |
78 """ % suite_name), important=False)) | 78 """ % suite_name), important=False)) |
79 | 79 |
80 class Speedometer(benchmark.Benchmark): | 80 class Speedometer(benchmark.Benchmark): |
81 test = SpeedometerMeasurement | 81 test = SpeedometerMeasurement |
82 | 82 |
| 83 @classmethod |
| 84 def Name(cls): |
| 85 return 'speedometer' |
| 86 |
83 def CreatePageSet(self, options): | 87 def CreatePageSet(self, options): |
84 ps = page_set.PageSet( | 88 ps = page_set.PageSet( |
85 file_path=os.path.abspath(__file__), | 89 file_path=os.path.abspath(__file__), |
86 archive_data_file='../page_sets/data/speedometer.json', | 90 archive_data_file='../page_sets/data/speedometer.json', |
87 bucket=page_set.PUBLIC_BUCKET) | 91 bucket=page_set.PUBLIC_BUCKET) |
88 ps.AddUserStory(page_module.Page( | 92 ps.AddUserStory(page_module.Page( |
89 'http://browserbench.org/Speedometer/', ps, ps.base_dir, | 93 'http://browserbench.org/Speedometer/', ps, ps.base_dir, |
90 make_javascript_deterministic=False)) | 94 make_javascript_deterministic=False)) |
91 return ps | 95 return ps |
OLD | NEW |