4d98e075d6057a56a331b01934d6437961f1ac22
[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 CanMonitorPower(self):
14     """Returns True iff power can be monitored asynchronously via
15     StartMonitoringPower() and StopMonitoringPower().
16     """
17     return False
18
19   def StartMonitoringPower(self, browser):
20     """Starts monitoring power utilization statistics.
21
22     See Platform#StartMonitoringPower for the arguments format.
23     """
24     raise NotImplementedError()
25
26   def StopMonitoringPower(self):
27     """Stops monitoring power utilization and returns collects stats
28
29     See Platform#StopMonitoringPower for the return format.
30     """
31     raise NotImplementedError()