Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: tools/perf/benchmarks/kraken.py

Issue 1917393002: [tools/perf] Reference legacy_page_test module instead of page_test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/perf/benchmarks/jetstream.py ('k') | tools/perf/benchmarks/media.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 core import perf_benchmark 9 from core import perf_benchmark
10 10
11 from telemetry import page as page_module 11 from telemetry import page as page_module
12 from telemetry.page import page_test 12 from telemetry.page import legacy_page_test
13 from telemetry import story 13 from telemetry import story
14 from telemetry.value import list_of_scalar_values 14 from telemetry.value import list_of_scalar_values
15 from telemetry.value import scalar 15 from telemetry.value import scalar
16 16
17 from metrics import power 17 from metrics import power
18 18
19 19
20 DESCRIPTIONS = { 20 DESCRIPTIONS = {
21 'ai-astar': 21 'ai-astar':
22 'This benchmark uses the [A* search algorithm]' 22 'This benchmark uses the [A* search algorithm]'
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 'This benchmark serializes [Tinderbox]' 62 'This benchmark serializes [Tinderbox]'
63 '(http://tests.themasta.com/tinderboxpushlog/?tree=Firefox) build ' 63 '(http://tests.themasta.com/tinderboxpushlog/?tree=Firefox) build '
64 'data to [JSON](http://www.json.org).', 64 'data to [JSON](http://www.json.org).',
65 } 65 }
66 66
67 67
68 def _Mean(l): 68 def _Mean(l):
69 return float(sum(l)) / len(l) if len(l) > 0 else 0.0 69 return float(sum(l)) / len(l) if len(l) > 0 else 0.0
70 70
71 71
72 class _KrakenMeasurement(page_test.PageTest): 72 class _KrakenMeasurement(legacy_page_test.LegacyPageTest):
73 73
74 def __init__(self): 74 def __init__(self):
75 super(_KrakenMeasurement, self).__init__() 75 super(_KrakenMeasurement, self).__init__()
76 self._power_metric = None 76 self._power_metric = None
77 77
78 def CustomizeBrowserOptions(self, options): 78 def CustomizeBrowserOptions(self, options):
79 power.PowerMetric.CustomizeBrowserOptions(options) 79 power.PowerMetric.CustomizeBrowserOptions(options)
80 80
81 def WillStartBrowser(self, platform): 81 def WillStartBrowser(self, platform):
82 self._power_metric = power.PowerMetric(platform) 82 self._power_metric = power.PowerMetric(platform)
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 def CreateStorySet(self, options): 129 def CreateStorySet(self, options):
130 ps = story.StorySet( 130 ps = story.StorySet(
131 archive_data_file='../page_sets/data/kraken.json', 131 archive_data_file='../page_sets/data/kraken.json',
132 base_dir=os.path.dirname(os.path.abspath(__file__)), 132 base_dir=os.path.dirname(os.path.abspath(__file__)),
133 cloud_storage_bucket=story.PARTNER_BUCKET) 133 cloud_storage_bucket=story.PARTNER_BUCKET)
134 ps.AddStory(page_module.Page( 134 ps.AddStory(page_module.Page(
135 'http://krakenbenchmark.mozilla.org/kraken-1.1/driver.html', 135 'http://krakenbenchmark.mozilla.org/kraken-1.1/driver.html',
136 ps, ps.base_dir)) 136 ps, ps.base_dir))
137 return ps 137 return ps
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/jetstream.py ('k') | tools/perf/benchmarks/media.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698