lisa.wa.WAEnergyCollector#
- class lisa.wa.WAEnergyCollector(wa_output, df_postprocess=None)[source]#
Bases:
WAArtifactCollectorBase
WA collector for the energy_measurement augmentation.
Example:
def postprocess(df): df = df.pivot_table(values='value', columns='metric', index=['sample', 'iteration', 'workload']) df = pd.DataFrame({ 'CPU_power': ( df['A55_power'] + df['A76_1_power'] + df['A76_2_power'] ), }) df['unit'] = 'Watt' df = df.reset_index() df = df.melt(id_vars=['sample', 'iteration', 'workload', 'unit'], var_name='metric') return df WAOutput('wa/output/path').get_collector( 'energy', df_postprocess=postprocess, ).df
Attributes
Properties
df
inheritedpandas.DataFrame
containing the data collected.logger
inheritedConvenience short-hand for
self.get_logger()
.stats
inheritedShort-hand property equivalent to
self.get_stats()
.Methods
Returns a
lisa.stats.Stats
loaded with the resultpandas.DataFrame
.get_logger()
inheritedProvides a
logging.Logger
named aftercls
.log_locals()
inheritedDebugging aid: log the local variables of the calling function.
Attributes#
- WAEnergyCollector.NAME = 'energy'#
Properties#
- property WAEnergyCollector.df#
Inherited property, see
lisa.wa.WACollectorBase.df
pandas.DataFrame
containing the data collected.
- property WAEnergyCollector.logger#
Inherited property, see
lisa.utils.Loggable.logger
Convenience short-hand for
self.get_logger()
.
- property WAEnergyCollector.stats#
Inherited property, see
lisa.wa.StatsProp.stats
Short-hand property equivalent to
self.get_stats()
.
Methods#
- WAEnergyCollector.get_stats(**kwargs)[source]#
Returns a
lisa.stats.Stats
loaded with the resultpandas.DataFrame
.- Parameters:
ensure_default_groups (bool) – If
True
, ensure ref_group will contain appropriate keys for usual Workload Automation result display.ref_group – Forwarded to
lisa.stats.Stats
- Variable keyword arguments:
Forwarded to
lisa.stats.Stats
- classmethod WAEnergyCollector.get_logger(suffix=None)#
Inherited method, see
lisa.utils.Loggable.get_logger()
Provides a
logging.Logger
named aftercls
.
- classmethod WAEnergyCollector.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.