| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 benchmarkClient.didRunSuites = function(measuredValues) { | 62 benchmarkClient.didRunSuites = function(measuredValues) { |
| 63 benchmarkClient._measuredValues.push(measuredValues); | 63 benchmarkClient._measuredValues.push(measuredValues); |
| 64 benchmarkClient._timeValues.push(measuredValues.total); | 64 benchmarkClient._timeValues.push(measuredValues.total); |
| 65 }; | 65 }; |
| 66 benchmarkClient.iterationCount = {{ count }}; | 66 benchmarkClient.iterationCount = {{ count }}; |
| 67 startTest(); | 67 startTest(); |
| 68 """, | 68 """, |
| 69 count=iterationCount) | 69 count=iterationCount) |
| 70 tab.WaitForJavaScriptCondition2( | 70 tab.WaitForJavaScriptCondition2( |
| 71 'benchmarkClient._finishedTestCount == benchmarkClient.testsCount', | 71 'benchmarkClient._finishedTestCount == benchmarkClient.testsCount', |
| 72 timemout=600) | 72 timeout=600) |
| 73 results.AddValue(list_of_scalar_values.ListOfScalarValues( | 73 results.AddValue(list_of_scalar_values.ListOfScalarValues( |
| 74 page, 'Total', 'ms', | 74 page, 'Total', 'ms', |
| 75 tab.EvaluateJavaScript2('benchmarkClient._timeValues'), | 75 tab.EvaluateJavaScript2('benchmarkClient._timeValues'), |
| 76 important=True)) | 76 important=True)) |
| 77 | 77 |
| 78 # Extract the timings for each suite | 78 # Extract the timings for each suite |
| 79 for suite_name in self.enabled_suites: | 79 for suite_name in self.enabled_suites: |
| 80 results.AddValue(list_of_scalar_values.ListOfScalarValues( | 80 results.AddValue(list_of_scalar_values.ListOfScalarValues( |
| 81 page, suite_name, 'ms', | 81 page, suite_name, 'ms', |
| 82 tab.EvaluateJavaScript2(""" | 82 tab.EvaluateJavaScript2(""" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 124 |
| 125 @benchmark.Disabled('android') # crbug.com/687681 | 125 @benchmark.Disabled('android') # crbug.com/687681 |
| 126 class SpeedometerTurbo(Speedometer): | 126 class SpeedometerTurbo(Speedometer): |
| 127 def SetExtraBrowserOptions(self, options): | 127 def SetExtraBrowserOptions(self, options): |
| 128 super(SpeedometerTurbo, self).SetExtraBrowserOptions(options) | 128 super(SpeedometerTurbo, self).SetExtraBrowserOptions(options) |
| 129 v8_helper.EnableTurbo(options) | 129 v8_helper.EnableTurbo(options) |
| 130 | 130 |
| 131 @classmethod | 131 @classmethod |
| 132 def Name(cls): | 132 def Name(cls): |
| 133 return 'speedometer-turbo' | 133 return 'speedometer-turbo' |
| OLD | NEW |