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 CanMonitorPowerAsync(self):
14 """Returns True iff power can be monitored asynchronously via
15 StartMonitoringPowerAsync() and StopMonitoringPowerAsync().
19 def StartMonitoringPowerAsync(self):
20 """Starts monitoring power utilization statistics."""
21 raise NotImplementedError()
23 def StopMonitoringPowerAsync(self):
24 """Stops monitoring power utilization and returns collects stats
26 See Platform#StopMonitoringPowerAsync for the return format.
28 raise NotImplementedError()