lisa.wa.WAOutput#

class lisa.wa.WAOutput(path, kernel_path=None)[source]#

Bases: StatsProp, Mapping, Loggable

Recursively parse a Workload Automation output, using registered collectors (leaf subclasses of WACollectorBase). The data collected are accessible through a pandas.DataFrame in “database” format:

  • meaningless index

  • all values are tagged using tag columns

Parameters:
  • path (str) – Path containing a Workload Automation output.

  • kernel_path – Kernel source path. Used to resolve the name of the kernel which ran the workload.

  • kernel_path – str

Example:

wa_output = WAOutput('wa/output/path')
# Pick a specific collector. See also WAOutput.get_collector()
stats = wa_output['results'].stats
stats.plot_stats(filename='stats.html')

Attributes

__reversed__ inherited

See collections.abc.Mapping.__reversed__

Properties

df

DataFrame containing the data collected by all the registered WAOutput collectors.

jobs

List containing all the jobs present in the output of ‘wa run’.

outputs

Dict containing a mapping of ‘wa run’ names to RunOutput objects.

logger inherited

Convenience short-hand for self.get_logger().

stats inherited

Short-hand property equivalent to self.get_stats().

Methods

__contains__()

__getitem__()

__hash__()

Each instance is different, like regular objects, and unlike dictionaries.

__iter__()

__len__()

get_collector()

Returns a new collector with custom parameters passed to it.

__class_getitem__() inherited

See collections.abc.Iterable.__class_getitem__()

get() inherited

See collections.abc.Mapping.get()

get_logger() inherited

Provides a logging.Logger named after cls.

get_stats() inherited

Returns a lisa.stats.Stats loaded with the result pandas.DataFrame.

items() inherited

See collections.abc.Mapping.items()

keys() inherited

See collections.abc.Mapping.keys()

log_locals() inherited

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

values() inherited

See collections.abc.Mapping.values()

Attributes#

WAOutput.__reversed__ = None#

Properties#

property WAOutput.df[source]#

DataFrame containing the data collected by all the registered WAOutput collectors.

property WAOutput.jobs[source]#

List containing all the jobs present in the output of ‘wa run’.

property WAOutput.outputs[source]#

Dict containing a mapping of ‘wa run’ names to RunOutput objects.

property WAOutput.logger#

Inherited property, see lisa.utils.Loggable.logger

Convenience short-hand for self.get_logger().

property WAOutput.stats#

Inherited property, see lisa.wa.StatsProp.stats

Short-hand property equivalent to self.get_stats().

Methods#

WAOutput.__contains__(key)[source]#
WAOutput.__getitem__(key)[source]#
WAOutput.__hash__()[source]#

Each instance is different, like regular objects, and unlike dictionaries.

WAOutput.__iter__()[source]#
WAOutput.__len__()[source]#
WAOutput.get_collector(name, **kwargs)[source]#

Returns a new collector with custom parameters passed to it.

Parameters:

name (str) – Name of the collector.

Variable keyword arguments:

Forwarded to the collector’s constructor.

Example:

WAOutput('wa/output/path').get_collector('energy', postprocess=func)
classmethod WAOutput.__class_getitem__()#

Inherited method, see collections.abc.Iterable.__class_getitem__()

WAOutput.get()#

Inherited method, see collections.abc.Mapping.get()

classmethod WAOutput.get_logger(suffix=None)#

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

Provides a logging.Logger named after cls.

WAOutput.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.Stats loaded with the result pandas.DataFrame.

WAOutput.items()#

Inherited method, see collections.abc.Mapping.items()

WAOutput.keys()#

Inherited method, see collections.abc.Mapping.keys()

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

WAOutput.values()#

Inherited method, see collections.abc.Mapping.values()