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

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

Issue 1998433003: Add scrolling power test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move page. Created 4 years, 6 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/page_sets/trivial_sites.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 2014 The Chromium Authors. All rights reserved. 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 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 6
7 from benchmarks import silk_flags 7 from benchmarks import silk_flags
8 from measurements import power 8 from measurements import power
9 import page_sets 9 import page_sets
10 from telemetry import benchmark 10 from telemetry import benchmark
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 return 'power.gpu_rasterization.top_25' 171 return 'power.gpu_rasterization.top_25'
172 172
173 def CreateStorySet(self, _): 173 def CreateStorySet(self, _):
174 # Exclude techcrunch.com. It is not suitable for this benchmark because it 174 # Exclude techcrunch.com. It is not suitable for this benchmark because it
175 # does not consistently become quiescent within 60 seconds. 175 # does not consistently become quiescent within 60 seconds.
176 stories = self.page_set() 176 stories = self.page_set()
177 found = next((x for x in stories if 'techcrunch.com' in x.url), None) 177 found = next((x for x in stories if 'techcrunch.com' in x.url), None)
178 if found: 178 if found:
179 stories.RemoveStory(found) 179 stories.RemoveStory(found)
180 return stories 180 return stories
181
182
183 @benchmark.Enabled('mac')
184 class PowerScrollingTrivialPage(perf_benchmark.PerfBenchmark):
185 """Scroll a trivial page and measure power consumption."""
186 test = power.QuiescentPower
187 page_set = page_sets.TrivialScrollStorySet
188
189 @classmethod
190 def Name(cls):
191 return 'power.trivial_scroll'
OLDNEW
« no previous file with comments | « no previous file | tools/perf/page_sets/trivial_sites.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698