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 |
11 DOM APIs - a core set of web platform APIs used extensively in web applications- | 11 DOM APIs - a core set of web platform APIs used extensively in web applications- |
12 as well as six popular JavaScript frameworks: Ember.js, Backbone.js, jQuery, | 12 as well as six popular JavaScript frameworks: Ember.js, Backbone.js, jQuery, |
13 AngularJS, React, and Flight. Many of these frameworks are used on the most | 13 AngularJS, React, and Flight. Many of these frameworks are used on the most |
14 popular websites in the world, such as Facebook and Twitter. The performance of | 14 popular websites in the world, such as Facebook and Twitter. The performance of |
15 these types of operations depends on the speed of the DOM APIs, the JavaScript | 15 these types of operations depends on the speed of the DOM APIs, the JavaScript |
16 engine, CSS style resolution, layout, and other technologies. | 16 engine, CSS style resolution, layout, and other technologies. |
17 """ | 17 """ |
18 | 18 |
19 import os | 19 import os |
20 | 20 |
21 from metrics import keychain_metric | |
22 from telemetry import benchmark | 21 from telemetry import benchmark |
23 from telemetry import page as page_module | 22 from telemetry import page as page_module |
24 from telemetry.page import page_set | 23 from telemetry.page import page_set |
25 from telemetry.page import page_test | 24 from telemetry.page import page_test |
26 from telemetry.value import list_of_scalar_values | 25 from telemetry.value import list_of_scalar_values |
27 | 26 |
| 27 from metrics import keychain_metric |
| 28 |
28 | 29 |
29 class SpeedometerMeasurement(page_test.PageTest): | 30 class SpeedometerMeasurement(page_test.PageTest): |
30 enabled_suites = [ | 31 enabled_suites = [ |
31 'VanillaJS-TodoMVC', | 32 'VanillaJS-TodoMVC', |
32 'EmberJS-TodoMVC', | 33 'EmberJS-TodoMVC', |
33 'BackboneJS-TodoMVC', | 34 'BackboneJS-TodoMVC', |
34 'jQuery-TodoMVC', | 35 'jQuery-TodoMVC', |
35 'AngularJS-TodoMVC', | 36 'AngularJS-TodoMVC', |
36 'React-TodoMVC', | 37 'React-TodoMVC', |
37 'FlightJS-TodoMVC' | 38 'FlightJS-TodoMVC' |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 91 |
91 def CreatePageSet(self, options): | 92 def CreatePageSet(self, options): |
92 ps = page_set.PageSet( | 93 ps = page_set.PageSet( |
93 file_path=os.path.abspath(__file__), | 94 file_path=os.path.abspath(__file__), |
94 archive_data_file='../page_sets/data/speedometer.json', | 95 archive_data_file='../page_sets/data/speedometer.json', |
95 bucket=page_set.PUBLIC_BUCKET) | 96 bucket=page_set.PUBLIC_BUCKET) |
96 ps.AddUserStory(page_module.Page( | 97 ps.AddUserStory(page_module.Page( |
97 'http://browserbench.org/Speedometer/', ps, ps.base_dir, | 98 'http://browserbench.org/Speedometer/', ps, ps.base_dir, |
98 make_javascript_deterministic=False)) | 99 make_javascript_deterministic=False)) |
99 return ps | 100 return ps |
OLD | NEW |