lisa.wa.WATraceCollector#
- class lisa.wa.WATraceCollector(wa_output, trace_to_df=<function _stub_trace_to_df>, **kwargs)[source]#
Bases:
WAArtifactCollectorBaseWA collector for the trace augmentation.
- Parameters:
trace_to_df (collections.abc.Callable) – Function used by the collector to convert the
lisa.trace.Traceto apandas.DataFrame.- Variable keyword arguments:
Forwarded to
lisa.trace.Trace.
Example:
def trace_idle_analysis(trace): cpu = 0 df = trace.ana.idle.df_cluster_idle_state_residency([cpu]) df = df.reset_index() df['cpu'] = cpu # Melt the column 'time' into lines, so that the dataframe is in # "database" format: each value is uniquely identified by "tag" # columns return df.melt( var_name='metric', value_vars=['time'], id_vars=['idle_state'], ) WAOutput('wa/output/path').get_collector( 'trace', trace_to_df=trace_idle_analysis, ).df
Attributes
Properties
lisa.utils.LazyMappingthat maps job names & iteration numbers to their correspondinglisa.trace.Trace.dfinheritedpandas.DataFramecontaining the data collected.loggerinheritedConvenience short-hand for
self.get_logger().statsinheritedShort-hand property equivalent to
self.get_stats().Methods
get_logger()inheritedProvides a
logging.Loggernamed aftercls.get_stats()inheritedReturns a
lisa.stats.Statsloaded with the resultpandas.DataFrame.log_locals()inheritedDebugging aid: log the local variables of the calling function.
Attributes#
- WATraceCollector.NAME = 'trace'#
Properties#
- property WATraceCollector.traces[source]#
lisa.utils.LazyMappingthat maps job names & iteration numbers to their correspondinglisa.trace.Trace.
- property WATraceCollector.df#
Inherited property, see
lisa.wa.WACollectorBase.dfpandas.DataFramecontaining the data collected.
- property WATraceCollector.logger#
Inherited property, see
lisa.utils.Loggable.loggerConvenience short-hand for
self.get_logger().
- property WATraceCollector.stats#
Inherited property, see
lisa.wa.StatsProp.statsShort-hand property equivalent to
self.get_stats().
Methods#
- classmethod WATraceCollector.get_logger(suffix=None)#
Inherited method, see
lisa.utils.Loggable.get_logger()Provides a
logging.Loggernamed aftercls.
- WATraceCollector.get_stats(ensure_default_groups=True, ref_group=None, agg_cols=None, **kwargs)#
Inherited method, see
lisa.wa.StatsProp.get_stats()Returns a
lisa.stats.Statsloaded with the resultpandas.DataFrame.
- classmethod WATraceCollector.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.