OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 import json | 5 import json |
6 import math | 6 import math |
7 import os | 7 import os |
8 | 8 |
9 from telemetry import test | 9 from telemetry import test |
10 from telemetry.core import util | 10 from telemetry.core import util |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 class DomPerf(test.Test): | 73 class DomPerf(test.Test): |
74 """A suite of JavaScript benchmarks for exercising the browser's DOM. | 74 """A suite of JavaScript benchmarks for exercising the browser's DOM. |
75 | 75 |
76 The final score is computed as the geometric mean of the individual results. | 76 The final score is computed as the geometric mean of the individual results. |
77 Scores are not comparable across benchmark suite versions and higher scores | 77 Scores are not comparable across benchmark suite versions and higher scores |
78 means better performance: Bigger is better!""" | 78 means better performance: Bigger is better!""" |
79 test = _DomPerfMeasurement | 79 test = _DomPerfMeasurement |
80 | 80 |
81 def CreatePageSet(self, options): | 81 def CreatePageSet(self, options): |
82 dom_perf_dir = os.path.join(util.GetChromiumSrcDir(), 'data', 'dom_perf') | 82 dom_perf_dir = os.path.join(util.GetChromiumSrcDir(), 'data', 'dom_perf') |
83 base_page = 'file://run.html?reportInJS=1&run=' | 83 run_params = [ |
84 return page_set.PageSet.FromDict({ | 84 'Accessors', |
85 'pages': [ | 85 'CloneNodes', |
86 { 'url': base_page + 'Accessors' }, | 86 'CreateNodes', |
87 { 'url': base_page + 'CloneNodes' }, | 87 'DOMDivWalk', |
88 { 'url': base_page + 'CreateNodes' }, | 88 'DOMTable', |
89 { 'url': base_page + 'DOMDivWalk' }, | 89 'DOMWalk', |
90 { 'url': base_page + 'DOMTable' }, | 90 'Events', |
91 { 'url': base_page + 'DOMWalk' }, | 91 'Get+Elements', |
92 { 'url': base_page + 'Events' }, | 92 'GridSort', |
93 { 'url': base_page + 'Get+Elements' }, | 93 'Template' |
94 { 'url': base_page + 'GridSort' }, | 94 ] |
95 { 'url': base_page + 'Template' } | 95 ps = page_set.PageSet(file_path=dom_perf_dir) |
96 ] | 96 for param in run_params: |
97 }, dom_perf_dir) | 97 ps.AddPageWithDefaultRunNavigate( |
| 98 'file://run.html?reportInJS=1&run=%s' % param) |
| 99 return ps |
OLD | NEW |