lisa.energy_meter.ACME#

class lisa.energy_meter.ACME(target, channel_map={'CH0': 0}, host='baylibre-acme.local', iio_capture_bin='iio-capture', res_dir=None)[source]#

Bases: EnergyMeter

BayLibre’s ACME board based EnergyMeter

Parameters:
  • channel_map (collections.abc.Mapping) – Channels to use

  • host (str) – Hostname or IP address of the ACME board

  • iio_capture_bin (str) – path to iio-capture binary

Deprecated since version 2.0.

ACME is deprecated and will be removed in version 4.0: LISA energy meters are deprecated, please use devlib instruments or contribute the instrument to devlib

Classes

CONF_CLASS

Configuration class for ACME.

Attributes

INIT_KWARGS_KEY_MAP

Dictionary of __init__ parameter names to configuration key path.

REPORT_DELAY_S

iio-capture returns an empty string if killed right after its invocation, so we have to enforce a delay between reset() and report().

name

Properties

logger inherited

Convenience short-hand for self.get_logger().

Methods

report()

Stop iio-capture and collect sampled data.

reset()

Reset energy meter and start sampling from channels specified in the target configuration.

sample()

Get a sample from the energy meter.

check_init_param() inherited

Take the same parameters as __init__, and check their types according to what is specified in the configuration class.

conf_to_init_kwargs() inherited

Turn a configuration object into a dictionary suitable for passing to __init__ as **kwargs.

from_conf() inherited

Build an instance of EnergyMeter from a configuration object.

get_logger() inherited

Provides a logging.Logger named after cls.

log_locals() inherited

Debugging aid: log the local variables of the calling function.

Classes#

ACME.CONF_CLASS#

alias of ACMEConf

Attributes#

ACME.INIT_KWARGS_KEY_MAP = {'channel_map': ['channel-map'], 'host': ['host'], 'iio_capture_bin': ['iio-capture-bin']}#

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'].

ACME.REPORT_DELAY_S = 2.0#

iio-capture returns an empty string if killed right after its invocation, so we have to enforce a delay between reset() and report()

ACME.name = 'acme'#

Properties#

property ACME.logger#

Inherited property, see lisa.utils.Loggable.logger

Convenience short-hand for self.get_logger().

Methods#

ACME.report(out_dir, out_energy='energy.json')[source]#

Stop iio-capture and collect sampled data.

Parameters:
  • out_dir (str) – Output directory where to store results

  • out_file (str) – File name where to save energy data

ACME.reset()[source]#

Reset energy meter and start sampling from channels specified in the target configuration.

ACME.sample()[source]#

Get a sample from the energy meter

classmethod ACME.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 ACME.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 ACME.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 ACME.get_logger(suffix=None)#

Inherited method, see lisa.utils.Loggable.get_logger()

Provides a logging.Logger named after cls.

classmethod ACME.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.