OLD | NEW |
1 # Copyright 2012 The Chromium Authors. All rights reserved. | 1 # Copyright 2012 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 """Runs Microsoft's RoboHornet Pro benchmark.""" | 5 """Runs Microsoft's RoboHornet Pro benchmark.""" |
6 | 6 |
7 import os | 7 import os |
8 | 8 |
9 from metrics import power | 9 from metrics import power |
10 from telemetry import benchmark | 10 from telemetry import benchmark |
(...skipping 23 matching lines...) Expand all Loading... |
34 600) | 34 600) |
35 | 35 |
36 self._power_metric.Stop(page, tab) | 36 self._power_metric.Stop(page, tab) |
37 self._power_metric.AddResults(tab, results) | 37 self._power_metric.AddResults(tab, results) |
38 | 38 |
39 result = int(tab.EvaluateJavaScript('stopTime - startTime')) | 39 result = int(tab.EvaluateJavaScript('stopTime - startTime')) |
40 results.AddValue( | 40 results.AddValue( |
41 scalar.ScalarValue(results.current_page, 'Total', 'ms', result)) | 41 scalar.ScalarValue(results.current_page, 'Total', 'ms', result)) |
42 | 42 |
43 | 43 |
44 | 44 # We plan to remove this test because it doesn't give useful data, but |
| 45 # we need to wait until Chrome OS can implement support for more helpful |
| 46 # benchmarks. |
| 47 @benchmark.Enabled('chromeos') |
45 class RobohornetPro(benchmark.Benchmark): | 48 class RobohornetPro(benchmark.Benchmark): |
46 test = _RobohornetProMeasurement | 49 test = _RobohornetProMeasurement |
47 | 50 |
48 def CreatePageSet(self, options): | 51 def CreatePageSet(self, options): |
49 ps = page_set.PageSet( | 52 ps = page_set.PageSet( |
50 archive_data_file='../page_sets/data/robohornet_pro.json', | 53 archive_data_file='../page_sets/data/robohornet_pro.json', |
51 # Measurement require use of real Date.now() for measurement. | 54 # Measurement require use of real Date.now() for measurement. |
52 make_javascript_deterministic=False, | 55 make_javascript_deterministic=False, |
53 file_path=os.path.abspath(__file__), | 56 file_path=os.path.abspath(__file__), |
54 bucket=page_set.PARTNER_BUCKET) | 57 bucket=page_set.PARTNER_BUCKET) |
55 ps.AddPageWithDefaultRunNavigate( | 58 ps.AddPageWithDefaultRunNavigate( |
56 'http://ie.microsoft.com/testdrive/performance/robohornetpro/') | 59 'http://ie.microsoft.com/testdrive/performance/robohornetpro/') |
57 return ps | 60 return ps |
OLD | NEW |