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

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

Issue 816353008: [Telemetry] Explicitly define Name() method for all perf benchmarks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698