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

Side by Side Diff: tools/perf/benchmarks/spaceport.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, 5 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/smoothness.py ('k') | tools/perf/benchmarks/speedometer.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 spaceport.io's PerfMarks benchmark.""" 5 """Runs spaceport.io's PerfMarks benchmark."""
6 6
7 import logging 7 import logging
8 import os 8 import os
9 9
10 from telemetry import test 10 from telemetry import benchmark
11 from telemetry.core import util 11 from telemetry.core import util
12 from telemetry.page import page_measurement 12 from telemetry.page import page_measurement
13 from telemetry.page import page_set 13 from telemetry.page import page_set
14 14
15 15
16 class _SpaceportMeasurement(page_measurement.PageMeasurement): 16 class _SpaceportMeasurement(page_measurement.PageMeasurement):
17 def __init__(self): 17 def __init__(self):
18 super(_SpaceportMeasurement, self).__init__() 18 super(_SpaceportMeasurement, self).__init__()
19 19
20 def CustomizeBrowserOptions(self, options): 20 def CustomizeBrowserOptions(self, options):
(...skipping 28 matching lines...) Expand all
49 'JSON.stringify(window.__results)')) 49 'JSON.stringify(window.__results)'))
50 for key in result_dict: 50 for key in result_dict:
51 chart, trace = key.split('.', 1) 51 chart, trace = key.split('.', 1)
52 results.Add(trace, 'objects (bigger is better)', float(result_dict[key]), 52 results.Add(trace, 'objects (bigger is better)', float(result_dict[key]),
53 chart_name=chart, data_type='unimportant') 53 chart_name=chart, data_type='unimportant')
54 results.Add('Score', 'objects (bigger is better)', 54 results.Add('Score', 'objects (bigger is better)',
55 [float(x) for x in result_dict.values()]) 55 [float(x) for x in result_dict.values()])
56 56
57 57
58 # crbug.com/166703: This test frequently times out on Windows. 58 # crbug.com/166703: This test frequently times out on Windows.
59 @test.Disabled('mac', 'win') 59 @benchmark.Disabled('mac', 'win')
60 class Spaceport(test.Test): 60 class Spaceport(benchmark.Benchmark):
61 """spaceport.io's PerfMarks benchmark.""" 61 """spaceport.io's PerfMarks benchmark."""
62 test = _SpaceportMeasurement 62 test = _SpaceportMeasurement
63 63
64 def CreatePageSet(self, options): 64 def CreatePageSet(self, options):
65 spaceport_dir = os.path.join(util.GetChromiumSrcDir(), 'chrome', 'test', 65 spaceport_dir = os.path.join(util.GetChromiumSrcDir(), 'chrome', 'test',
66 'data', 'third_party', 'spaceport') 66 'data', 'third_party', 'spaceport')
67 ps = page_set.PageSet(file_path=spaceport_dir) 67 ps = page_set.PageSet(file_path=spaceport_dir)
68 ps.AddPageWithDefaultRunNavigate('file://index.html') 68 ps.AddPageWithDefaultRunNavigate('file://index.html')
69 return ps 69 return ps
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/smoothness.py ('k') | tools/perf/benchmarks/speedometer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698