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

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

Issue 337603005: Rename telemetry.test.Test to telemetry.benchmark.Benchmark. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 os 5 import os
6 6
7 from telemetry import test 7 from telemetry import benchmark
8 from telemetry.core import util 8 from telemetry.core import util
9 from telemetry.page import page_measurement 9 from telemetry.page import page_measurement
10 from telemetry.page import page_set 10 from telemetry.page import page_set
11 11
12 12
13 def _CreatePageSetFromPath(path): 13 def _CreatePageSetFromPath(path):
14 assert os.path.exists(path) 14 assert os.path.exists(path)
15 15
16 page_urls = [] 16 page_urls = []
17 serving_dirs = set() 17 serving_dirs = set()
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 parts = line.split() 86 parts = line.split()
87 values = [float(v.replace(',', '')) for v in parts[1:-1]] 87 values = [float(v.replace(',', '')) for v in parts[1:-1]]
88 units = parts[-1] 88 units = parts[-1]
89 metric = page.display_name.split('.')[0].replace('/', '_') 89 metric = page.display_name.split('.')[0].replace('/', '_')
90 results.Add(metric, units, values) 90 results.Add(metric, units, values)
91 break 91 break
92 92
93 print log 93 print log
94 94
95 95
96 class BlinkPerfAll(test.Test): 96 class BlinkPerfAll(benchmark.Benchmark):
97 tag = 'all' 97 tag = 'all'
98 test = _BlinkPerfMeasurement 98 test = _BlinkPerfMeasurement
99 99
100 def CreatePageSet(self, options): 100 def CreatePageSet(self, options):
101 path = os.path.join(util.GetChromiumSrcDir(), 101 path = os.path.join(util.GetChromiumSrcDir(),
102 'third_party', 'WebKit', 'PerformanceTests') 102 'third_party', 'WebKit', 'PerformanceTests')
103 return _CreatePageSetFromPath(path) 103 return _CreatePageSetFromPath(path)
104 104
105 class BlinkPerfAnimation(test.Test): 105 class BlinkPerfAnimation(benchmark.Benchmark):
106 tag = 'animation' 106 tag = 'animation'
107 test = _BlinkPerfMeasurement 107 test = _BlinkPerfMeasurement
108 108
109 def CreatePageSet(self, options): 109 def CreatePageSet(self, options):
110 path = os.path.join(util.GetChromiumSrcDir(), 110 path = os.path.join(util.GetChromiumSrcDir(),
111 'third_party', 'WebKit', 'PerformanceTests', 'Animation') 111 'third_party', 'WebKit', 'PerformanceTests', 'Animation')
112 return _CreatePageSetFromPath(path) 112 return _CreatePageSetFromPath(path)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698