lisa.wa.WAJankbenchCollector#

class lisa.wa.WAJankbenchCollector(wa_output, df_postprocess=None)[source]#

Bases: WAArtifactCollectorBase

WA collector for the jankbench frame timings.

The collector framework will return a single pandas.DataFrame with the results from every jankbench job in lisa.stats.Stats format (i.e. the returned dataframe is arranged such that each reported metric is separated as a separate row). The metrics reported are:

. total_duration: Time in milliseconds to complete the frame

. jank_frame: Boolean indicator of missed frame deadline. 1 is a Jank frame, 0 is not.

. name: Subtest name, provided by the Jankbench app

. frame_id: monotonically increasing frame number, starts from 1 for each subtest iteration.

An example plotter matching the old-style output can be found in the jupyter notebook working directory at ipynb/wltests/WAOutput-JankbenchDemo.ipynb

If you have existing code expecting a more direct translation of the original sqlite database format, you can massage the collected dataframe back into a closer resemblance to the original source database with this sequence of pandas operations:

wa_output = WAOutput('wa/output/path')
df = wa_output['jankbench'].df
db_df = df.pivot(index=['iteration', 'id', 'kernel', 'frame_id'], columns=['variable'])
db_df = db_df['value'].reset_index()
db_df.columns.name = None
# db_df now looks more like the original format

Attributes

Properties

df inherited

pandas.DataFrame containing the data collected.

logger inherited

Convenience short-hand for self.get_logger().

stats inherited

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

Methods

get_stats()

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

get_logger() inherited

Provides a logging.Logger named after cls.

log_locals() inherited

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

Attributes#

WAJankbenchCollector.NAME = 'jankbench'#

Properties#

property WAJankbenchCollector.df#

Inherited property, see lisa.wa.WACollectorBase.df

pandas.DataFrame containing the data collected.

property WAJankbenchCollector.logger#

Inherited property, see lisa.utils.Loggable.logger

Convenience short-hand for self.get_logger().

property WAJankbenchCollector.stats#

Inherited property, see lisa.wa.StatsProp.stats

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

Methods#

WAJankbenchCollector.get_stats(**kwargs)[source]#

Returns a lisa.stats.Stats loaded with the result pandas.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 WAJankbenchCollector.get_logger(suffix=None)#

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

Provides a logging.Logger named after cls.

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