Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / tools / perf / benchmarks / power.py
blobba29d15f0a8311f09758b75121f8cdad8016175e
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 from core import perf_benchmark
7 from benchmarks import silk_flags
8 from measurements import power
9 from telemetry import benchmark
10 import page_sets
13 @benchmark.Enabled('android')
14 class PowerAndroidAcceptance(perf_benchmark.PerfBenchmark):
15 """Android power acceptance test."""
16 test = power.Power
17 page_set = page_sets.AndroidAcceptancePageSet
18 @classmethod
19 def Name(cls):
20 return 'power.android_acceptance'
23 @benchmark.Enabled('android')
24 class PowerTypical10Mobile(perf_benchmark.PerfBenchmark):
25 """Android typical 10 mobile power test."""
26 test = power.Power
27 page_set = page_sets.Typical10MobilePageSet
28 @classmethod
29 def Name(cls):
30 return 'power.typical_10_mobile'
32 @benchmark.Enabled('android')
33 class PowerGpuRasterizationTypical10Mobile(perf_benchmark.PerfBenchmark):
34 """Measures power on key mobile sites with GPU rasterization."""
35 tag = 'gpu_rasterization'
36 test = power.Power
37 page_set = page_sets.Typical10MobilePageSet
39 def SetExtraBrowserOptions(self, options):
40 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options)
42 @classmethod
43 def Name(cls):
44 return 'power.gpu_rasterization.typical_10_mobile'
46 @benchmark.Enabled('mac')
47 class PowerTop10(perf_benchmark.PerfBenchmark):
48 """Top 10 quiescent power test."""
49 test = power.QuiescentPower
50 page_set = page_sets.Top10PageSet
51 @classmethod
52 def Name(cls):
53 return 'power.top_10'
56 @benchmark.Enabled('mac')
57 class PowerTop25(perf_benchmark.PerfBenchmark):
58 """Top 25 quiescent power test."""
59 test = power.QuiescentPower
60 page_set = page_sets.Top25PageSet
61 @classmethod
62 def Name(cls):
63 return 'power.top_25'
65 def CreateUserStorySet(self, _):
66 # Exclude techcrunch.com. It is not suitable for this benchmark because it
67 # does not consistently become quiescent within 60 seconds.
68 user_stories = self.page_set()
69 found = next((x for x in user_stories if 'techcrunch.com' in x.url), None)
70 if found:
71 user_stories.RemoveUserStory(found)
72 return user_stories