| 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 json | 7 import json |
| 8 import os | 8 import os |
| 9 | 9 |
| 10 from core import perf_benchmark | 10 from core import perf_benchmark |
| 11 | 11 |
| 12 from telemetry import benchmark |
| 12 from telemetry import page as page_module | 13 from telemetry import page as page_module |
| 13 from telemetry.page import legacy_page_test | 14 from telemetry.page import legacy_page_test |
| 14 from telemetry import story | 15 from telemetry import story |
| 15 from telemetry.value import list_of_scalar_values | 16 from telemetry.value import list_of_scalar_values |
| 16 from telemetry.value import scalar | 17 from telemetry.value import scalar |
| 17 | 18 |
| 18 from metrics import power | 19 from metrics import power |
| 19 | 20 |
| 20 | 21 |
| 21 DESCRIPTIONS = { | 22 DESCRIPTIONS = { |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 109 |
| 109 # TODO(tonyg/nednguyen): This measurement shouldn't calculate Total. The | 110 # TODO(tonyg/nednguyen): This measurement shouldn't calculate Total. The |
| 110 # results system should do that for us. | 111 # results system should do that for us. |
| 111 results.AddValue(scalar.ScalarValue( | 112 results.AddValue(scalar.ScalarValue( |
| 112 results.current_page, 'Total', 'ms', total, | 113 results.current_page, 'Total', 'ms', total, |
| 113 description='Total of the means of the results for each type ' | 114 description='Total of the means of the results for each type ' |
| 114 'of benchmark in [Mozilla\'s Kraken JavaScript benchmark]' | 115 'of benchmark in [Mozilla\'s Kraken JavaScript benchmark]' |
| 115 '(http://krakenbenchmark.mozilla.org/)')) | 116 '(http://krakenbenchmark.mozilla.org/)')) |
| 116 | 117 |
| 117 | 118 |
| 119 @benchmark.Owner(emails=['bmeurer@chromium.org', 'mvstanton@chromium.org']) |
| 118 class Kraken(perf_benchmark.PerfBenchmark): | 120 class Kraken(perf_benchmark.PerfBenchmark): |
| 119 """Mozilla's Kraken JavaScript benchmark. | 121 """Mozilla's Kraken JavaScript benchmark. |
| 120 | 122 |
| 121 http://krakenbenchmark.mozilla.org/ | 123 http://krakenbenchmark.mozilla.org/ |
| 122 """ | 124 """ |
| 123 test = _KrakenMeasurement | 125 test = _KrakenMeasurement |
| 124 | 126 |
| 125 @classmethod | 127 @classmethod |
| 126 def Name(cls): | 128 def Name(cls): |
| 127 return 'kraken' | 129 return 'kraken' |
| 128 | 130 |
| 129 def CreateStorySet(self, options): | 131 def CreateStorySet(self, options): |
| 130 ps = story.StorySet( | 132 ps = story.StorySet( |
| 131 archive_data_file='../page_sets/data/kraken.json', | 133 archive_data_file='../page_sets/data/kraken.json', |
| 132 base_dir=os.path.dirname(os.path.abspath(__file__)), | 134 base_dir=os.path.dirname(os.path.abspath(__file__)), |
| 133 cloud_storage_bucket=story.PARTNER_BUCKET) | 135 cloud_storage_bucket=story.PARTNER_BUCKET) |
| 134 ps.AddStory(page_module.Page( | 136 ps.AddStory(page_module.Page( |
| 135 'http://krakenbenchmark.mozilla.org/kraken-1.1/driver.html', | 137 'http://krakenbenchmark.mozilla.org/kraken-1.1/driver.html', |
| 136 ps, ps.base_dir)) | 138 ps, ps.base_dir)) |
| 137 return ps | 139 return ps |
| 138 | 140 |
| 139 @classmethod | 141 @classmethod |
| 140 def ShouldDisable(cls, possible_browser): | 142 def ShouldDisable(cls, possible_browser): |
| 141 return cls.IsSvelte(possible_browser) # http://crbug.com/624411 | 143 return cls.IsSvelte(possible_browser) # http://crbug.com/624411 |
| OLD | NEW |