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

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

Issue 2338343002: [system health] Compute power and clock sync latency metrics (Closed)
Patch Set: Synced to head Created 4 years, 2 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 | « no previous file | tools/perf/benchmarks/system_health.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 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 core import perf_benchmark 5 from core import perf_benchmark
6 from telemetry.timeline import chrome_trace_category_filter 6 from telemetry.timeline import chrome_trace_category_filter
7 from telemetry.web_perf import timeline_based_measurement 7 from telemetry.web_perf import timeline_based_measurement
8 import page_sets 8 import page_sets
9 from telemetry import benchmark 9 from telemetry import benchmark
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 @benchmark.Disabled('android', 'win8') 52 @benchmark.Disabled('android', 'win8')
53 class BattOrToughVideoCases(_BattOrBenchmark): 53 class BattOrToughVideoCases(_BattOrBenchmark):
54 """Obtains media metrics for key user scenarios.""" 54 """Obtains media metrics for key user scenarios."""
55 page_set = page_sets.ToughVideoCasesPageSet 55 page_set = page_sets.ToughVideoCasesPageSet
56 56
57 @classmethod 57 @classmethod
58 def Name(cls): 58 def Name(cls):
59 return 'battor.tough_video_cases' 59 return 'battor.tough_video_cases'
60 60
61 61
62 # TODO(rnephew): Add a version that scrolls.
63 class BattOrSystemHealthLoadingDesktop(_BattOrBenchmark):
64 """Desktop Chrome Memory System Health Benchmark."""
65
66 def CreateStorySet(self, options):
67 return page_sets.SystemHealthStorySet(platform='desktop', case='load')
68
69 @classmethod
70 def ShouldDisable(cls, possible_browser):
71 return (
72 super(BattOrSystemHealthLoadingDesktop, cls).ShouldDisable(
73 possible_browser) or
74 possible_browser.platform.GetDeviceTypeName() != 'Desktop')
75
76 @classmethod
77 def Name(cls):
78 return 'battor.system_health_loading_desktop'
79
80
81 class BattOrSystemHealthLoadingMobile(_BattOrBenchmark):
82 """Mobile Chrome Memory System Health Benchmark."""
83
84 def CreateStorySet(self, options):
85 return page_sets.SystemHealthStorySet(platform='mobile', case='load')
86
87 @classmethod
88 def ShouldDisable(cls, possible_browser):
89 if possible_browser.platform.GetDeviceTypeName() == 'Desktop':
90 return True
91 if (possible_browser.browser_type == 'reference' and
92 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X'):
93 return True
94
95 return super(BattOrSystemHealthLoadingMobile, cls).ShouldDisable(
96 possible_browser)
97
98 @classmethod
99 def Name(cls):
100 return 'battor.system_health_loading_mobile'
101
102
103 class BattOrPowerCases(_BattOrBenchmark): 62 class BattOrPowerCases(_BattOrBenchmark):
104 page_set = page_sets.power_cases.PowerCasesPageSet 63 page_set = page_sets.power_cases.PowerCasesPageSet
105 64
106 @classmethod 65 @classmethod
107 def Name(cls): 66 def Name(cls):
108 return 'battor.power_cases' 67 return 'battor.power_cases'
109 68
110 69
111 @benchmark.Disabled('all') # crbug.com/651384. 70 @benchmark.Disabled('all') # crbug.com/651384.
112 class BattOrPowerCasesNoChromeTrace(_BattOrBenchmark): 71 class BattOrPowerCasesNoChromeTrace(_BattOrBenchmark):
(...skipping 26 matching lines...) Expand all
139 @benchmark.Enabled('mac') 98 @benchmark.Enabled('mac')
140 class BattOrSteadyStatePages(_BattOrBenchmark): 99 class BattOrSteadyStatePages(_BattOrBenchmark):
141 100
142 def CreateStorySet(self, options): 101 def CreateStorySet(self, options):
143 # We want it to wait for 30 seconds to be comparable to legacy power tests. 102 # We want it to wait for 30 seconds to be comparable to legacy power tests.
144 return page_sets.IdleAfterLoadingStories(wait_in_seconds=30) 103 return page_sets.IdleAfterLoadingStories(wait_in_seconds=30)
145 104
146 @classmethod 105 @classmethod
147 def Name(cls): 106 def Name(cls):
148 return 'battor.steady_state' 107 return 'battor.steady_state'
OLDNEW
« no previous file with comments | « no previous file | tools/perf/benchmarks/system_health.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698