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

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

Issue 2198523003: [Android][Telemetry] Enable ATrace tracing for BattOr Tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | no next file » | 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.web_perf import timeline_based_measurement 6 from telemetry.web_perf import timeline_based_measurement
7 import page_sets 7 import page_sets
8 from telemetry import benchmark 8 from telemetry import benchmark
9 9
10 10
11 # TODO(rnephew): Remove BattOr naming from all benchmarks once the BattOr tests 11 # TODO(rnephew): Remove BattOr naming from all benchmarks once the BattOr tests
12 # are the primary means of benchmarking power. 12 # are the primary means of benchmarking power.
13 class _BattOrBenchmark(perf_benchmark.PerfBenchmark): 13 class _BattOrBenchmark(perf_benchmark.PerfBenchmark):
14 14
15 def CreateTimelineBasedMeasurementOptions(self): 15 def CreateTimelineBasedMeasurementOptions(self):
16 options = timeline_based_measurement.Options() 16 options = timeline_based_measurement.Options()
17 options.config.enable_battor_trace = True 17 options.config.enable_battor_trace = True
18 options.config.enable_chrome_trace = True 18 options.config.enable_chrome_trace = True
19 options.config.enable_atrace_trace = True
19 options.config.chrome_trace_config.SetDefaultOverheadFilter() 20 options.config.chrome_trace_config.SetDefaultOverheadFilter()
20 options.SetTimelineBasedMetrics(['powerMetric', 'clockSyncLatencyMetric']) 21 options.SetTimelineBasedMetrics(['powerMetric', 'clockSyncLatencyMetric'])
21 return options 22 return options
22 23
23 @classmethod 24 @classmethod
24 def ShouldDisable(cls, possible_browser): 25 def ShouldDisable(cls, possible_browser):
25 # Only run if BattOr is detected. 26 # Only run if BattOr is detected.
26 if not possible_browser.platform.HasBattOrConnected(): 27 if not possible_browser.platform.HasBattOrConnected():
27 return True 28 return True
28 29
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 return 'battor.power_cases' 96 return 'battor.power_cases'
96 97
97 98
98 class BattOrPowerCasesNoChromeTrace(_BattOrBenchmark): 99 class BattOrPowerCasesNoChromeTrace(_BattOrBenchmark):
99 page_set = page_sets.power_cases.PowerCasesPageSet 100 page_set = page_sets.power_cases.PowerCasesPageSet
100 101
101 def CreateTimelineBasedMeasurementOptions(self): 102 def CreateTimelineBasedMeasurementOptions(self):
102 options = timeline_based_measurement.Options() 103 options = timeline_based_measurement.Options()
103 options.config.enable_battor_trace = True 104 options.config.enable_battor_trace = True
104 options.config.enable_chrome_trace = False 105 options.config.enable_chrome_trace = False
106 options.config.enable_atrace_trace = False
105 options.config.chrome_trace_config.SetDefaultOverheadFilter() 107 options.config.chrome_trace_config.SetDefaultOverheadFilter()
106 options.SetTimelineBasedMetrics(['powerMetric', 'clockSyncLatencyMetric']) 108 options.SetTimelineBasedMetrics(['powerMetric', 'clockSyncLatencyMetric'])
107 return options 109 return options
108 110
109 @classmethod 111 @classmethod
110 def Name(cls): 112 def Name(cls):
111 return 'battor.power_cases_no_chrome_trace' 113 return 'battor.power_cases_no_chrome_trace'
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698