lisa.wa.WAJankbenchCollector#
- class lisa.wa.WAJankbenchCollector(wa_output, df_postprocess=None)[source]#
Bases:
WAArtifactCollectorBaseWA collector for the jankbench frame timings.
The collector framework will return a single
pandas.DataFramewith the results from every jankbench job inlisa.stats.Statsformat (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.1is a Jank frame,0is not..
name: Subtest name, provided by the Jankbench app.
frame_id: monotonically increasing frame number, starts from1for 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.ipynbIf 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
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#
- WAJankbenchCollector.NAME = 'jankbench'#
Properties#
- property WAJankbenchCollector.df#
Inherited property, see
lisa.wa.WACollectorBase.dfpandas.DataFramecontaining the data collected.
- property WAJankbenchCollector.logger#
Inherited property, see
lisa.utils.Loggable.loggerConvenience short-hand for
self.get_logger().
- property WAJankbenchCollector.stats#
Inherited property, see
lisa.wa.StatsProp.statsShort-hand property equivalent to
self.get_stats().
Methods#
- WAJankbenchCollector.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 WAJankbenchCollector.get_logger(suffix=None)#
Inherited method, see
lisa.utils.Loggable.get_logger()Provides a
logging.Loggernamed aftercls.
- 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.