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 Mozilla's Kraken JavaScript benchmark.""" | 5 """Runs Mozilla's Kraken JavaScript 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 |
| 11 from telemetry import page as page_module |
11 from telemetry.page import page_set | 12 from telemetry.page import page_set |
12 from telemetry.page import page_test | 13 from telemetry.page import page_test |
13 from telemetry.value import list_of_scalar_values | 14 from telemetry.value import list_of_scalar_values |
14 from telemetry.value import scalar | 15 from telemetry.value import scalar |
15 | 16 |
16 DESCRIPTIONS = { | 17 DESCRIPTIONS = { |
17 'ai-astar': | 18 'ai-astar': |
18 'This benchmark uses the [A* search algorithm]' | 19 'This benchmark uses the [A* search algorithm]' |
19 '(http://en.wikipedia.org/wiki/A*_search_algorithm) to automatically ' | 20 '(http://en.wikipedia.org/wiki/A*_search_algorithm) to automatically ' |
20 'plot an efficient path between two points, in the presence of ' | 21 'plot an efficient path between two points, in the presence of ' |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 113 |
113 class Kraken(benchmark.Benchmark): | 114 class Kraken(benchmark.Benchmark): |
114 """Mozilla's Kraken JavaScript benchmark.""" | 115 """Mozilla's Kraken JavaScript benchmark.""" |
115 test = _KrakenMeasurement | 116 test = _KrakenMeasurement |
116 | 117 |
117 def CreatePageSet(self, options): | 118 def CreatePageSet(self, options): |
118 ps = page_set.PageSet( | 119 ps = page_set.PageSet( |
119 archive_data_file='../page_sets/data/kraken.json', | 120 archive_data_file='../page_sets/data/kraken.json', |
120 file_path=os.path.abspath(__file__), | 121 file_path=os.path.abspath(__file__), |
121 bucket=page_set.PARTNER_BUCKET) | 122 bucket=page_set.PARTNER_BUCKET) |
122 ps.AddPageWithDefaultRunNavigate( | 123 ps.AddUserStory(page_module.Page( |
123 'http://krakenbenchmark.mozilla.org/kraken-1.1/driver.html') | 124 'http://krakenbenchmark.mozilla.org/kraken-1.1/driver.html', |
| 125 ps, ps.base_dir)) |
124 return ps | 126 return ps |
OLD | NEW |