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

Side by Side Diff: tools/perf/benchmarks/tab_switching.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 from telemetry import benchmark 5 from telemetry import benchmark
6 6
7 from measurements import tab_switching 7 from measurements import tab_switching
8 import page_sets 8 import page_sets
9 9
10 10
11 @benchmark.Enabled('has tabs') 11 @benchmark.Enabled('has tabs')
12 class TabSwitchingTop10(benchmark.Benchmark): 12 class TabSwitchingTop10(benchmark.Benchmark):
13 """This test records the MPArch.RWH_TabSwitchPaintDuration histogram. 13 """This test records the MPArch.RWH_TabSwitchPaintDuration histogram.
14 14
15 The histogram is a measure of the time between when a tab was requested to be 15 The histogram is a measure of the time between when a tab was requested to be
16 shown, and when first paint occurred. The script opens 10 pages in different 16 shown, and when first paint occurred. The script opens 10 pages in different
17 tabs, waits for them to load, and then switches to each tab and records the 17 tabs, waits for them to load, and then switches to each tab and records the
18 metric. The pages were chosen from Alexa top ranking sites. 18 metric. The pages were chosen from Alexa top ranking sites.
19 """ 19 """
20 test = tab_switching.TabSwitching 20 test = tab_switching.TabSwitching
21 page_set = page_sets.Top10PageSet 21 page_set = page_sets.Top10PageSet
22 22
23 @classmethod
24 def Name(cls):
25 return 'tab_switching.top_10'
26
23 27
24 @benchmark.Enabled('has tabs') 28 @benchmark.Enabled('has tabs')
25 class TabSwitchingTypical25(benchmark.Benchmark): 29 class TabSwitchingTypical25(benchmark.Benchmark):
26 """This test records the MPArch.RWH_TabSwitchPaintDuration histogram. 30 """This test records the MPArch.RWH_TabSwitchPaintDuration histogram.
27 31
28 The histogram is a measure of the time between when a tab was requested to be 32 The histogram is a measure of the time between when a tab was requested to be
29 shown, and when first paint occurred. The script opens 25 pages in different 33 shown, and when first paint occurred. The script opens 25 pages in different
30 tabs, waits for them to load, and then switches to each tab and records the 34 tabs, waits for them to load, and then switches to each tab and records the
31 metric. The pages were chosen from Alexa top ranking sites. 35 metric. The pages were chosen from Alexa top ranking sites.
32 """ 36 """
33 test = tab_switching.TabSwitching 37 test = tab_switching.TabSwitching
34 page_set = page_sets.Typical25PageSet 38 page_set = page_sets.Typical25PageSet
35 39
40 @classmethod
41 def Name(cls):
42 return 'tab_switching.typical_25'
43
36 44
37 @benchmark.Enabled('has tabs') 45 @benchmark.Enabled('has tabs')
38 class TabSwitchingFiveBlankTabs(benchmark.Benchmark): 46 class TabSwitchingFiveBlankTabs(benchmark.Benchmark):
39 """This test records the MPArch.RWH_TabSwitchPaintDuration histogram. 47 """This test records the MPArch.RWH_TabSwitchPaintDuration histogram.
40 48
41 The histogram is a measure of the time between when a tab was requested to be 49 The histogram is a measure of the time between when a tab was requested to be
42 shown, and when first paint occurred. The script opens 5 blank pages in 50 shown, and when first paint occurred. The script opens 5 blank pages in
43 different tabs, waits for them to load, and then switches to each tab and 51 different tabs, waits for them to load, and then switches to each tab and
44 records the metric. Blank pages are use to detect unnecessary idle wakeups. 52 records the metric. Blank pages are use to detect unnecessary idle wakeups.
45 """ 53 """
46 test = tab_switching.TabSwitching 54 test = tab_switching.TabSwitching
47 page_set = page_sets.FiveBlankPagesPageSet 55 page_set = page_sets.FiveBlankPagesPageSet
48 options = {'pageset_repeat': 10} 56 options = {'pageset_repeat': 10}
49 57
58 @classmethod
59 def Name(cls):
60 return 'tab_switching.five_blank_pages'
61
50 62
51 @benchmark.Enabled('has tabs') 63 @benchmark.Enabled('has tabs')
52 class TabSwitchingToughEnergyCases(benchmark.Benchmark): 64 class TabSwitchingToughEnergyCases(benchmark.Benchmark):
53 """This test records the MPArch.RWH_TabSwitchPaintDuration histogram. 65 """This test records the MPArch.RWH_TabSwitchPaintDuration histogram.
54 66
55 The histogram is a measure of the time between when a tab was requested to be 67 The histogram is a measure of the time between when a tab was requested to be
56 shown, and when first paint occurred. The script opens each page in a 68 shown, and when first paint occurred. The script opens each page in a
57 different tab, waits for them to load, and then switches to each tab and 69 different tab, waits for them to load, and then switches to each tab and
58 records the metric. The pages were written by hand to stress energy usage. 70 records the metric. The pages were written by hand to stress energy usage.
59 """ 71 """
60 test = tab_switching.TabSwitching 72 test = tab_switching.TabSwitching
61 page_set = page_sets.ToughEnergyCasesPageSet 73 page_set = page_sets.ToughEnergyCasesPageSet
62 options = {'pageset_repeat': 10} 74 options = {'pageset_repeat': 10}
63 75
76 @classmethod
77 def Name(cls):
78 return 'tab_switching.tough_energy_cases'
79
64 80
65 @benchmark.Disabled # Just for local testing, not on waterfall. 81 @benchmark.Disabled # Just for local testing, not on waterfall.
66 class TabSwitchingFlashEnergyCases(benchmark.Benchmark): 82 class TabSwitchingFlashEnergyCases(benchmark.Benchmark):
67 test = tab_switching.TabSwitching 83 test = tab_switching.TabSwitching
68 page_set = page_sets.FlashEnergyCasesPageSet 84 page_set = page_sets.FlashEnergyCasesPageSet
69 options = {'pageset_repeat': 10} 85 options = {'pageset_repeat': 10}
86 @classmethod
87 def Name(cls):
88 return 'tab_switching.flash_energy_cases'
89
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698