lisa.wa.WAEnergyCollector#
- class lisa.wa.WAEnergyCollector(wa_output, df_postprocess=None)[source]#
Bases:
WAArtifactCollectorBaseWA 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
dfinheritedpandas.DataFramecontaining the data collected.loggerinheritedConvenience short-hand for
self.get_logger().statsinheritedShort-hand property equivalent to
self.get_stats().Methods
Returns a
lisa.stats.Statsloaded with the resultpandas.DataFrame.get_logger()inheritedProvides a
logging.Loggernamed 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.dfpandas.DataFramecontaining the data collected.
- property WAEnergyCollector.logger#
Inherited property, see
lisa.utils.Loggable.loggerConvenience short-hand for
self.get_logger().
- property WAEnergyCollector.stats#
Inherited property, see
lisa.wa.StatsProp.statsShort-hand property equivalent to
self.get_stats().
Methods#
- WAEnergyCollector.get_stats(**kwargs)[source]#
Returns a
lisa.stats.Statsloaded 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.Loggernamed 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.