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