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

Side by Side Diff: tools/perf/benchmarks/indexeddb_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, 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/image_decoding.py ('k') | tools/perf/benchmarks/jetstream.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 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 """Runs Chromium's IndexedDB performance test. These test: 5 """Runs Chromium's IndexedDB performance test. These test:
6 6
7 Databases: 7 Databases:
8 create/delete 8 create/delete
9 Keys: 9 Keys:
10 create/delete 10 create/delete
11 Indexes: 11 Indexes:
12 create/delete 12 create/delete
13 Data access: 13 Data access:
14 Random read/write 14 Random read/write
15 Read cache 15 Read cache
16 Cursors: 16 Cursors:
17 Read & random writes 17 Read & random writes
18 Walking multiple 18 Walking multiple
19 Seeking. 19 Seeking.
20 """ 20 """
21 21
22 import json 22 import json
23 import os 23 import os
24 24
25 from metrics import memory 25 from metrics import memory
26 from metrics import power 26 from metrics import power
27 from metrics import v8_object_stats 27 from metrics import v8_object_stats
28 from telemetry import test 28 from telemetry import benchmark
29 from telemetry.core import util 29 from telemetry.core import util
30 from telemetry.page import page_measurement 30 from telemetry.page import page_measurement
31 from telemetry.page import page_set 31 from telemetry.page import page_set
32 32
33 _V8_COUNTER_NAMES = [ 33 _V8_COUNTER_NAMES = [
34 'V8.OsMemoryAllocated', 34 'V8.OsMemoryAllocated',
35 ] 35 ]
36 36
37 class _IndexedDbMeasurement(page_measurement.PageMeasurement): 37 class _IndexedDbMeasurement(page_measurement.PageMeasurement):
38 def __init__(self, *args, **kwargs): 38 def __init__(self, *args, **kwargs):
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 msec = float(result_dict[key]) 74 msec = float(result_dict[key])
75 results.Add(key, 'ms', msec, data_type='unimportant') 75 results.Add(key, 'ms', msec, data_type='unimportant')
76 total += msec 76 total += msec
77 results.Add('Total Perf', 'ms', total) 77 results.Add('Total Perf', 'ms', total)
78 78
79 def CustomizeBrowserOptions(self, options): 79 def CustomizeBrowserOptions(self, options):
80 memory.MemoryMetric.CustomizeBrowserOptions(options) 80 memory.MemoryMetric.CustomizeBrowserOptions(options)
81 power.PowerMetric.CustomizeBrowserOptions(options) 81 power.PowerMetric.CustomizeBrowserOptions(options)
82 v8_object_stats.V8ObjectStatsMetric.CustomizeBrowserOptions(options) 82 v8_object_stats.V8ObjectStatsMetric.CustomizeBrowserOptions(options)
83 83
84 class IndexedDb(test.Test): 84 class IndexedDb(benchmark.Benchmark):
85 """Chromium's IndexedDB Performance tests.""" 85 """Chromium's IndexedDB Performance tests."""
86 test = _IndexedDbMeasurement 86 test = _IndexedDbMeasurement
87 87
88 def CreatePageSet(self, options): 88 def CreatePageSet(self, options):
89 indexeddb_dir = os.path.join(util.GetChromiumSrcDir(), 'chrome', 'test', 89 indexeddb_dir = os.path.join(util.GetChromiumSrcDir(), 'chrome', 'test',
90 'data', 'indexeddb') 90 'data', 'indexeddb')
91 ps = page_set.PageSet(file_path=indexeddb_dir) 91 ps = page_set.PageSet(file_path=indexeddb_dir)
92 ps.AddPageWithDefaultRunNavigate('file://perf_test.html') 92 ps.AddPageWithDefaultRunNavigate('file://perf_test.html')
93 return ps 93 return ps
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/image_decoding.py ('k') | tools/perf/benchmarks/jetstream.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698