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

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

Issue 2743773002: Port part of media.tough_video_cases to TBMv2 (Closed)
Patch Set: Improve how category filter is set up Created 3 years, 9 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 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 18 matching lines...) Expand all
29 29
30 @classmethod 30 @classmethod
31 def ShouldDisable(cls, possible_browser): 31 def ShouldDisable(cls, possible_browser):
32 return not possible_browser.platform.HasBattOrConnected() 32 return not possible_browser.platform.HasBattOrConnected()
33 33
34 @classmethod 34 @classmethod
35 def ShouldTearDownStateAfterEachStoryRun(cls): 35 def ShouldTearDownStateAfterEachStoryRun(cls):
36 return True 36 return True
37 37
38 38
39 # android: See battor.android.tough_video_cases below
40 # win8: crbug.com/531618
41 # crbug.com/565180: Only include cases that report time_to_play
42 # Taken directly from media benchmark.
43 @benchmark.Disabled('android', 'win8')
44 class BattOrToughVideoCases(_BattOrBenchmark):
45 """Obtains media metrics for key user scenarios."""
46 page_set = page_sets.ToughVideoCasesPageSet
47
48 @classmethod
49 def Name(cls):
50 return 'battor.tough_video_cases'
51
52
53 @benchmark.Enabled('mac') 39 @benchmark.Enabled('mac')
54 class BattOrTrivialPages(_BattOrBenchmark): 40 class BattOrTrivialPages(_BattOrBenchmark):
55 41
56 def CreateStorySet(self, options): 42 def CreateStorySet(self, options):
57 # We want it to wait for 30 seconds to be comparable to legacy power tests. 43 # We want it to wait for 30 seconds to be comparable to legacy power tests.
58 return page_sets.TrivialSitesStorySet(wait_in_seconds=30) 44 return page_sets.TrivialSitesStorySet(wait_in_seconds=30)
59 45
60 @classmethod 46 @classmethod
61 def Name(cls): 47 def Name(cls):
62 return 'battor.trivial_pages' 48 return 'battor.trivial_pages'
63 49
64 @benchmark.Enabled('mac') 50 @benchmark.Enabled('mac')
65 class BattOrSteadyStatePages(_BattOrBenchmark): 51 class BattOrSteadyStatePages(_BattOrBenchmark):
66 52
67 def CreateStorySet(self, options): 53 def CreateStorySet(self, options):
68 # We want it to wait for 30 seconds to be comparable to legacy power tests. 54 # We want it to wait for 30 seconds to be comparable to legacy power tests.
69 return page_sets.IdleAfterLoadingStories(wait_in_seconds=30) 55 return page_sets.IdleAfterLoadingStories(wait_in_seconds=30)
70 56
71 @classmethod 57 @classmethod
72 def Name(cls): 58 def Name(cls):
73 return 'battor.steady_state' 59 return 'battor.steady_state'
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698