| 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 core import perf_benchmark | 21 from core import perf_benchmark |
| 22 | 22 |
| 23 from benchmarks import v8_helper | 23 from benchmarks import v8_helper |
| 24 | 24 |
| 25 from telemetry import benchmark | |
| 26 from telemetry import page as page_module | 25 from telemetry import page as page_module |
| 27 from telemetry.page import legacy_page_test | 26 from telemetry.page import legacy_page_test |
| 28 from telemetry import story | 27 from telemetry import story |
| 29 from telemetry.value import list_of_scalar_values | 28 from telemetry.value import list_of_scalar_values |
| 30 | 29 |
| 31 from metrics import keychain_metric | 30 from metrics import keychain_metric |
| 32 | 31 |
| 33 | 32 |
| 34 class SpeedometerMeasurement(legacy_page_test.LegacyPageTest): | 33 class SpeedometerMeasurement(legacy_page_test.LegacyPageTest): |
| 35 enabled_suites = [ | 34 enabled_suites = [ |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 ps = story.StorySet( | 101 ps = story.StorySet( |
| 103 base_dir=os.path.dirname(os.path.abspath(__file__)), | 102 base_dir=os.path.dirname(os.path.abspath(__file__)), |
| 104 archive_data_file='../page_sets/data/speedometer.json', | 103 archive_data_file='../page_sets/data/speedometer.json', |
| 105 cloud_storage_bucket=story.PUBLIC_BUCKET) | 104 cloud_storage_bucket=story.PUBLIC_BUCKET) |
| 106 ps.AddStory(page_module.Page( | 105 ps.AddStory(page_module.Page( |
| 107 'http://browserbench.org/Speedometer/', ps, ps.base_dir, | 106 'http://browserbench.org/Speedometer/', ps, ps.base_dir, |
| 108 make_javascript_deterministic=False)) | 107 make_javascript_deterministic=False)) |
| 109 return ps | 108 return ps |
| 110 | 109 |
| 111 | 110 |
| 112 @benchmark.Disabled('reference') # crbug.com/579546 | |
| 113 class SpeedometerIgnition(Speedometer): | |
| 114 def SetExtraBrowserOptions(self, options): | |
| 115 super(SpeedometerIgnition, self).SetExtraBrowserOptions(options) | |
| 116 v8_helper.EnableIgnition(options) | |
| 117 | |
| 118 @classmethod | |
| 119 def Name(cls): | |
| 120 return 'speedometer-ignition' | |
| 121 | |
| 122 | |
| 123 class SpeedometerTurbo(Speedometer): | 111 class SpeedometerTurbo(Speedometer): |
| 124 def SetExtraBrowserOptions(self, options): | 112 def SetExtraBrowserOptions(self, options): |
| 125 super(SpeedometerTurbo, self).SetExtraBrowserOptions(options) | 113 super(SpeedometerTurbo, self).SetExtraBrowserOptions(options) |
| 126 v8_helper.EnableTurbo(options) | 114 v8_helper.EnableTurbo(options) |
| 127 | 115 |
| 128 @classmethod | 116 @classmethod |
| 129 def Name(cls): | 117 def Name(cls): |
| 130 return 'speedometer-turbo' | 118 return 'speedometer-turbo' |
| OLD | NEW |