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 telemetry.core import exceptions
8 class PowerMonitor(object):
11 Provides an interface to register power consumption during a test.
13 def CanMonitorPower(self):
14 """Returns True iff power can be monitored asynchronously via
15 StartMonitoringPower() and StopMonitoringPower().
19 def StartMonitoringPower(self, browser):
20 """Starts monitoring power utilization statistics.
22 See Platform#StartMonitoringPower for the arguments format.
24 raise NotImplementedError()
26 def StopMonitoringPower(self):
27 """Stops monitoring power utilization and returns collects stats
29 See Platform#StopMonitoringPower for the return format.
31 raise NotImplementedError()