lisa.energy_meter.HWMon#
- class lisa.energy_meter.HWMon(target, channel_map, res_dir=None)[source]#
Bases:
EnergyMeter
HWMon energy meter
- Parameters:
channel_map (collections.abc.Mapping) – Channels to use
Deprecated since version 2.0.
HWMon
is deprecated and will be removed in version 4.0: LISA energy meters are deprecated, please use devlib instruments or contribute the instrument to devlibClasses
Configuration class for
HWMon
.Attributes
Dictionary of
__init__
parameter names to configuration key path.Properties
logger
inheritedConvenience short-hand for
self.get_logger()
.Methods
Get total energy consumption since last
reset()
.Reset the energy meter.
Get a sample from the energy meter.
check_init_param()
inheritedTake the same parameters as
__init__
, and check their types according to what is specified in the configuration class.conf_to_init_kwargs()
inheritedTurn a configuration object into a dictionary suitable for passing to
__init__
as**kwargs
.from_conf()
inheritedBuild an instance of
EnergyMeter
from a configuration object.get_logger()
inheritedProvides a
logging.Logger
named aftercls
.log_locals()
inheritedDebugging aid: log the local variables of the calling function.
Classes#
Attributes#
- HWMon.INIT_KWARGS_KEY_MAP = {'channel_map': ['channel-map']}#
Dictionary of
__init__
parameter names to configuration key path.That path is a list of strings to take into account sublevels like
['level-key', 'sublevel', 'foo']
.
- HWMon.name = 'hwmon'#
Properties#
- property HWMon.logger#
Inherited property, see
lisa.utils.Loggable.logger
Convenience short-hand for
self.get_logger()
.
Methods#
- HWMon.report(out_dir, out_file='energy.json')[source]#
Get total energy consumption since last
reset()
- classmethod HWMon.check_init_param(**kwargs)#
Inherited method, see
lisa.conf.Configurable.check_init_param()
Take the same parameters as
__init__
, and check their types according to what is specified in the configuration class.
- classmethod HWMon.conf_to_init_kwargs(conf)#
Inherited method, see
lisa.conf.Configurable.conf_to_init_kwargs()
Turn a configuration object into a dictionary suitable for passing to
__init__
as**kwargs
.
- classmethod HWMon.from_conf(target, conf, res_dir=None)#
Inherited method, see
lisa.energy_meter.EnergyMeter.from_conf()
Build an instance of
EnergyMeter
from a configuration object.
- classmethod HWMon.get_logger(suffix=None)#
Inherited method, see
lisa.utils.Loggable.get_logger()
Provides a
logging.Logger
named aftercls
.
- classmethod HWMon.log_locals(var_names=None, level='debug')#
Inherited method, see
lisa.utils.Loggable.log_locals()
Debugging aid: log the local variables of the calling function.