Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / tools / telemetry / telemetry / core / platform / power_monitor / __init__.py
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.
4
5 from telemetry.core import exceptions
6
7
8 class PowerMonitor(object):
9   """A power profiler.
10
11   Provides an interface to register power consumption during a test.
12   """
13   def CanMonitorPowerAsync(self):
14     """Returns True iff power can be monitored asynchronously via
15     StartMonitoringPowerAsync() and StopMonitoringPowerAsync().
16     """
17     return False
18
19   def StartMonitoringPowerAsync(self):
20     """Starts monitoring power utilization statistics."""
21     raise NotImplementedError()
22
23   def StopMonitoringPowerAsync(self):
24     """Stops monitoring power utilization and returns collects stats
25
26     See Platform#StopMonitoringPowerAsync for the return format.
27     """
28     raise NotImplementedError()