lisa.analysis.rta.RTAEventsAnalysis#

class lisa.analysis.rta.RTAEventsAnalysis(trace, proxy=None)[source]#

Bases: TraceAnalysisBase

Support for RTA events analysis.

Parameters:

trace (lisa.trace.Trace) – input Trace object

Attributes

RTAPP_USERSPACE_EVENTS

List of ftrace events rtapp is able to emit.

name

Name of the analysis class.

Properties

rtapp_reftime

Return the tuple representing the kernel and user timestamp.

rtapp_tasks

List of lisa.analysis.tasks.TaskID of the rt-app tasks present in the trace.

rtapp_window

Return the time range the rt-app main thread executed.

logger inherited

Convenience short-hand for self.get_logger().

Methods

df_phases()

Get phases actual start times and durations.

df_rtapp_event()

Returns a pandas.DataFrame of all the rt-app generated events.

df_rtapp_loop()

Dataframe of events generated by each rt-app generated task.

df_rtapp_main()

Dataframe of events generated by the rt-app main task.

df_rtapp_phase_end()

End of the specified phase for a given task.

df_rtapp_phase_start()

Start of the specified phase for a given task.

df_rtapp_phases_end()

Dataframe of phases end times.

df_rtapp_phases_start()

Dataframe of phases start times.

df_rtapp_stats()

Returns a pandas.DataFrame of all the rt-app generated stats.

df_rtapp_task()

Dataframe of events generated by each rt-app generated task.

plot_latency()

Plot the Latency/Slack and Performance data for the specified task.

plot_perf()

Plot the performance index.

plot_perf_index_histogram()

Plot the perf index histogram.

plot_phases()

Draw the task’s phases colored bands.

plot_slack_histogram()

Plot the slack histogram.

task_phase_at()

Return the PhaseWindow for the specified task and timestamp.

task_phase_window()

Return the window of a requested task phase.

task_phase_windows()

Yield a PhaseWindow for each rt-app phase of the specified task.

task_window()

Return the start end end time for the specified task.

cache() inherited

Decorator to enable caching of the output of dataframe getter function in the trace cache.

call_on_trace() inherited

Call a method of a subclass on a given trace.

df_method() inherited

Dataframe function decorator.

get_all_events() inherited

Returns the set of all events used by any of the methods.

get_analysis_classes() inherited

get_default_plot_path() inherited

Return the default path to use to save plots for the analysis.

get_df_methods() inherited

get_logger() inherited

Provides a logging.Logger named after cls.

get_plot_methods() inherited

log_locals() inherited

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

plot_method() inherited

Plot function decorator.

save_plot() inherited

Save a holoviews element or matplotlib.figure.Figure as an image file.

Attributes#

RTAEventsAnalysis.RTAPP_USERSPACE_EVENTS = ['userspace@rtapp_main', 'userspace@rtapp_task', 'userspace@rtapp_loop', 'userspace@rtapp_event', 'userspace@rtapp_stats']#

List of ftrace events rtapp is able to emit.

RTAEventsAnalysis.name = 'rta'#

Name of the analysis class.

Properties#

property RTAEventsAnalysis.rtapp_reftime[source]#

Return the tuple representing the kernel and user timestamp.

RTApp log events timestamps are generated by the kernel ftrace infrastructure. This method allows to know which trace timestamp corresponds to the rt-app generated timestamps stored in log files.

Returns:

a RefTime reporting kernel and user timestamps.

Required trace events:
  • userspace@rtapp_main

property RTAEventsAnalysis.rtapp_tasks[source]#

List of lisa.analysis.tasks.TaskID of the rt-app tasks present in the trace.

Required trace events:
  • userspace@rtapp_main or userspace@rtapp_task or userspace@rtapp_loop or userspace@rtapp_event or userspace@rtapp_stats

property RTAEventsAnalysis.rtapp_window[source]#

Return the time range the rt-app main thread executed.

Returns:

a tuple(start_time, end_time)

Required trace events:
  • userspace@rtapp_main

property RTAEventsAnalysis.logger#

Inherited property, see lisa.utils.Loggable.logger

Convenience short-hand for self.get_logger().

Methods#

RTAEventsAnalysis.df_phases(task, wlgen_profile=None, *, df_fmt=None)[source]#

Called on Trace instances as trace.ana.rta.df_phases()

Get phases actual start times and durations

Parameters:
Returns:

A pandas.DataFrame with index representing the start time of a phase and these column:

  • phase: the phase number or its name extracted from wlgen_profile.

  • duration: the measured phase duration.

  • properties: the properties mapping of the phase extracted from wlgen_profile.

Added by lisa.analysis.base.TraceAnalysisBase.df_method():

Parameters:

df_fmt (str or None) –

Format of dataframe to return. One of:

Returns:

The return type is determined by the dataframe format chosen for the trace object.

Required trace events:
  • userspace@rtapp_loop

RTAEventsAnalysis.df_rtapp_event(task=None, *, df_fmt=None)[source]#

Called on Trace instances as trace.ana.rta.df_rtapp_event()

Returns a pandas.DataFrame of all the rt-app generated events.

Parameters:

task (int or str or lisa.analysis.tasks.TaskID) – the (optional) rt-app task to filter for

Returns:

a pandas.DataFrame with:

  • A __comm column: the actual rt-app trace task name

  • A __pid column: the PID of the task

  • A __cpu column: the CPU on which the task was running at event generation time

  • A __line column: the ftrace line numer

  • A type column: the type of the generated event

  • A desc column: the mnemonic type of the generated event

  • A id column: the ID of the resource associated to the event, e.g. the ID of the fired timer

The index represents the timestamp of the event.

Added by lisa.analysis.base.TraceAnalysisBase.df_method():

Parameters:

df_fmt (str or None) –

Format of dataframe to return. One of:

Returns:

The return type is determined by the dataframe format chosen for the trace object.

Required trace events:
  • userspace@rtapp_event

RTAEventsAnalysis.df_rtapp_loop(task=None, wlgen_profile=None, *, df_fmt=None)[source]#

Called on Trace instances as trace.ana.rta.df_rtapp_loop()

Dataframe of events generated by each rt-app generated task.

Parameters:
Returns:

a pandas.DataFrame with:

  • A __comm column: the actual rt-app trace task name

  • A __cpu column: the CPU on which the task was running at event generation time

  • A __line column: the ftrace line numer

  • A __pid column: the PID of the task

  • An event column: the generated event:

    • start: the start of the __pid:__comm related event

    • end: the end of the __pid:__comm related event

  • A phase column: the phases counter for each __pid:__comm task

  • A phase_loop colum: the phase_loops’s counter

  • A thread_loop column: the thread_loop’s counter

Added by lisa.analysis.base.TraceAnalysisBase.df_method():

Parameters:

df_fmt (str or None) –

Format of dataframe to return. One of:

Returns:

The return type is determined by the dataframe format chosen for the trace object.

Required trace events:
  • userspace@rtapp_loop

RTAEventsAnalysis.df_rtapp_main(*, df_fmt=None)[source]#

Called on Trace instances as trace.ana.rta.df_rtapp_main()

Dataframe of events generated by the rt-app main task.

Returns:

a pandas.DataFrame with:

  • A __comm column: the actual rt-app trace task name

  • A __cpu column: the CPU on which the task was running at event generation time

  • A __pid column: the PID of the task

  • A data column: the data corresponding to the reported event:

    • the base timestamp used for logfile generated event for the clock_ref event

    • NaN for all the other events

  • An event column: the event generated:

    • start: the start of the rt-app main thread execution

    • end: the end of the rt-app main thread execution

    • clock_ref: the time rt-app gets the clock to be used for logfile entries

Added by lisa.analysis.base.TraceAnalysisBase.df_method():

Parameters:

df_fmt (str or None) –

Format of dataframe to return. One of:

Returns:

The return type is determined by the dataframe format chosen for the trace object.

Required trace events:
  • userspace@rtapp_main

RTAEventsAnalysis.df_rtapp_phase_end(task, phase=-1, wlgen_profile=None, *, df_fmt=None)[source]#

Called on Trace instances as trace.ana.rta.df_rtapp_phase_end()

End of the specified phase for a given task.

A negative phase value can be used to count from the oldest, e.g. -1 represents the last phase.

Parameters:
Returns:

the requires task’s phase end timestamp

Added by lisa.analysis.base.TraceAnalysisBase.df_method():

Parameters:

df_fmt (str or None) –

Format of dataframe to return. One of:

Returns:

The return type is determined by the dataframe format chosen for the trace object.

Required trace events:
  • userspace@rtapp_loop

RTAEventsAnalysis.df_rtapp_phase_start(task, phase=0, wlgen_profile=None, *, df_fmt=None)[source]#

Called on Trace instances as trace.ana.rta.df_rtapp_phase_start()

Start of the specified phase for a given task.

A negative phase value can be used to count from the oldest, e.g. -1 represents the last phase.

Parameters:
Returns:

the requires task’s phase start timestamp

Added by lisa.analysis.base.TraceAnalysisBase.df_method():

Parameters:

df_fmt (str or None) –

Format of dataframe to return. One of:

Returns:

The return type is determined by the dataframe format chosen for the trace object.

Required trace events:
  • userspace@rtapp_loop

RTAEventsAnalysis.df_rtapp_phases_end(task=None, wlgen_profile=None, *, df_fmt=None)[source]#

Called on Trace instances as trace.ana.rta.df_rtapp_phases_end()

Dataframe of phases end times.

Parameters:
Returns:

a pandas.DataFrame with:

  • A __comm column: the actual rt-app trace task name

  • A __pid column: the PID of the task

  • A phase column: the phases counter for each __pid:__comm task

The index represents the timestamp of a phase end event.

Added by lisa.analysis.base.TraceAnalysisBase.df_method():

Parameters:

df_fmt (str or None) –

Format of dataframe to return. One of:

Returns:

The return type is determined by the dataframe format chosen for the trace object.

Required trace events:
  • userspace@rtapp_loop

RTAEventsAnalysis.df_rtapp_phases_start(task=None, wlgen_profile=None, *, df_fmt=None)[source]#

Called on Trace instances as trace.ana.rta.df_rtapp_phases_start()

Dataframe of phases start times.

Parameters:
Returns:

a pandas.DataFrame with:

  • A __comm column: the actual rt-app trace task name

  • A __pid column: the PID of the task

  • A phase column: the phases counter for each __pid:__comm task

The index represents the timestamp of a phase start event.

Added by lisa.analysis.base.TraceAnalysisBase.df_method():

Parameters:

df_fmt (str or None) –

Format of dataframe to return. One of:

Returns:

The return type is determined by the dataframe format chosen for the trace object.

Required trace events:
  • userspace@rtapp_loop

RTAEventsAnalysis.df_rtapp_stats(task=None, *, df_fmt=None)[source]#

Called on Trace instances as trace.ana.rta.df_rtapp_stats()

Returns a pandas.DataFrame of all the rt-app generated stats.

Parameters:

task (int or str or lisa.analysis.tasks.TaskID) – the (optional) rt-app task to filter for

Returns:

a pandas.DataFrame with a set of colums representing the stats generated by rt-app after each loop.

  • A __comm column: the actual rt-app trace task name

  • A __pid column: the PID of the task

  • A __cpu column: the CPU on which the task was running at event generation time

  • A __line column: the ftrace line numer

  • A type column: the type of the generated event

  • A desc column: the mnemonic type of the generated event

  • A id column: the ID of the resource associated to the event, e.g. the ID of the fired timer

The index represents the timestamp of the event.

See also

the rt-app provided documentation: scheduler-tools/rt-app

Added by lisa.analysis.base.TraceAnalysisBase.df_method():

Parameters:

df_fmt (str or None) –

Format of dataframe to return. One of:

Returns:

The return type is determined by the dataframe format chosen for the trace object.

Required trace events:
  • userspace@rtapp_stats

RTAEventsAnalysis.df_rtapp_task(task=None, *, df_fmt=None)[source]#

Called on Trace instances as trace.ana.rta.df_rtapp_task()

Dataframe of events generated by each rt-app generated task.

Parameters:

task (int or str or lisa.analysis.tasks.TaskID) – the (optional) rt-app task to filter for

Returns:

a pandas.DataFrame with:

  • A __comm column: the actual rt-app trace task name

  • A __cpu column: the CPU on which the task was running at event generation time

  • A __line column: the ftrace line numer

  • A __pid column: the PID of the task

  • An event column: the event generated:

    • start: the start of the __pid:__comm task execution

    • end: the end of the __pid:__comm task execution

Added by lisa.analysis.base.TraceAnalysisBase.df_method():

Parameters:

df_fmt (str or None) –

Format of dataframe to return. One of:

Returns:

The return type is determined by the dataframe format chosen for the trace object.

Required trace events:
  • userspace@rtapp_task

RTAEventsAnalysis.plot_latency(task: TaskID, *, filepath=None, output='holoviews', img_format=None, always_save=False, backend=None, _compat_render=False, link_dataframes=None, cursor_delta=None, width=None, height=None, rc_params=None, axis=None, interactive=None, colors: Sequence[str] = None, linestyles: Sequence[str] = None, markers: Sequence[str] = None, **kwargs)[source]#

task=big_0-0

Called on Trace instances as trace.ana.rta.plot_latency()

Plot the Latency/Slack and Performance data for the specified task.

Parameters:

task (int or str or lisa.analysis.tasks.TaskID) – the rt-app task to filter for

See also

plot_perf() for metrics definition.

Added by lisa.analysis.base.AnalysisHelpers.plot_method():

Returns:

The return type is determined by the output parameter.

Parameters:
  • backend (str or None) –

    Holoviews plot library backend to use:

    • bokeh: good support for interactive plots

    • matplotlib: sometimes better static image output, but unpredictable results that more often than not require a fair amount of hacks to get something good.

    • plotly: not supported by LISA but technically available. Since it’s very similar to bokeh feature-wise, bokeh should be preferred.

    Note

    In a notebook, the way to choose which backend should be used to display plots is typically selected with e.g. holoviews.extension('bokeh') at the beginning of the notebook. The backend parameter is more intended for expert use where an object of the given library is required, without depending on the environment.

  • link_dataframes (list(pandas.DataFrame) or None) – Gated by output="ui". List of dataframes to display under the figure, which is dynamically linked with it: clicking on the plot will scroll in the dataframes and vice versa.

  • filepath (str or None) – Path of the file to save the figure in. If None, no file is saved.

  • always_save (bool) – When True, the plot is always saved even if no filepath has explicitly been set. In that case, a default path will be used.

  • img_format (str) – The image format to generate. Defaults to using filepath to guess the type, or “png” if no filepath is given. html and rst are supported in addition to matplotlib image formats.

  • output (str or None) –

    Change the return value of the method:

    • None: Equivalent to holoviews for now. In the future, this will be either holoviews or ui if used in an interactive jupyter notebook.

    • holoviews: a bare holoviews element.

    • render: a backend-specific object, such as matplotlib.figure.Figure if backend='matplotlib'

    • html: HTML document

    • rst: a snippet of reStructuredText

    • ui: Pseudo holoviews figure, enriched with extra controls.

      Note

      No assumption must be made on the return type other than that it can be displayed in a notebook cell output (and with IPython.display.display()). The public API holoviews is implemented in a best-effort approach, so that .options() and .opts() will work, but compositions using e.g. x * y will not work if x is a holoviews element.

      In the midterm, the output type will be changed so that it is a real holoviews object, rather than some sort of proxy.

  • colors (list(str) or None) –

    List of color names to use for the plots.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to set matplotlib options.

  • linestyles (list(str) or None) –

    List of linestyle to use for the plots.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to set matplotlib options.

  • markers (list(str) or None) –

    List of marker to use for the plots.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to set matplotlib options.

  • axis (matplotlib.axes.Axes or numpy.ndarray(matplotlib.axes.Axes) or None) –

    instance of matplotlib.axes.Axes to plot into. If None, a new figure and axis are created and returned.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to compose plot elements: http://holoviews.org/user_guide/Composing_Elements.html

  • rc_params (dict(str, object) or None) –

    Matplotlib rc params dictionary overlaid on existing settings.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to set matplotlib options.

  • _compat_render (bool) – Internal parameter not to be used. This enables the compatibility mode where render=True by default when matplotlib is the current holoviews backend.

Required trace events:
  • userspace@rtapp_stats

RTAEventsAnalysis.plot_perf(task: TaskID, *, filepath=None, output='holoviews', img_format=None, always_save=False, backend=None, _compat_render=False, link_dataframes=None, cursor_delta=None, width=None, height=None, rc_params=None, axis=None, interactive=None, colors: Sequence[str] = None, linestyles: Sequence[str] = None, markers: Sequence[str] = None, **kwargs)[source]#

task=big_0-0

Called on Trace instances as trace.ana.rta.plot_perf()

Plot the performance index.

Parameters:

task (int or str or lisa.analysis.tasks.TaskID) – the rt-app task to filter for

The perf index is defined as:

\[perf_index = \frac{slack}{c_period - c_run}\]

where:

  • c_period: is the configured period for an activation

  • c_run: is the configured run time for an activation, assuming to run at the maximum frequency and on the maximum capacity CPU.

  • slack: is the measured slack for an activation

The slack is defined as the different among the activation deadline and the actual completion time of the activation.

The deadline defines also the start of the next activation, thus in normal conditions a task activation is always required to complete before its deadline.

The slack is thus a positive value if a task complete before its deadline. It’s zero when a task complete an activation right at its eadline. It’s negative when the completion is over the deadline.

Thus, a performance index in [0..1] range represents activations completed within their deadlines. While, the more the performance index is negative the more the task is late with respect to its deadline.

Added by lisa.analysis.base.AnalysisHelpers.plot_method():

Returns:

The return type is determined by the output parameter.

Parameters:
  • backend (str or None) –

    Holoviews plot library backend to use:

    • bokeh: good support for interactive plots

    • matplotlib: sometimes better static image output, but unpredictable results that more often than not require a fair amount of hacks to get something good.

    • plotly: not supported by LISA but technically available. Since it’s very similar to bokeh feature-wise, bokeh should be preferred.

    Note

    In a notebook, the way to choose which backend should be used to display plots is typically selected with e.g. holoviews.extension('bokeh') at the beginning of the notebook. The backend parameter is more intended for expert use where an object of the given library is required, without depending on the environment.

  • link_dataframes (list(pandas.DataFrame) or None) – Gated by output="ui". List of dataframes to display under the figure, which is dynamically linked with it: clicking on the plot will scroll in the dataframes and vice versa.

  • filepath (str or None) – Path of the file to save the figure in. If None, no file is saved.

  • always_save (bool) – When True, the plot is always saved even if no filepath has explicitly been set. In that case, a default path will be used.

  • img_format (str) – The image format to generate. Defaults to using filepath to guess the type, or “png” if no filepath is given. html and rst are supported in addition to matplotlib image formats.

  • output (str or None) –

    Change the return value of the method:

    • None: Equivalent to holoviews for now. In the future, this will be either holoviews or ui if used in an interactive jupyter notebook.

    • holoviews: a bare holoviews element.

    • render: a backend-specific object, such as matplotlib.figure.Figure if backend='matplotlib'

    • html: HTML document

    • rst: a snippet of reStructuredText

    • ui: Pseudo holoviews figure, enriched with extra controls.

      Note

      No assumption must be made on the return type other than that it can be displayed in a notebook cell output (and with IPython.display.display()). The public API holoviews is implemented in a best-effort approach, so that .options() and .opts() will work, but compositions using e.g. x * y will not work if x is a holoviews element.

      In the midterm, the output type will be changed so that it is a real holoviews object, rather than some sort of proxy.

  • colors (list(str) or None) –

    List of color names to use for the plots.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to set matplotlib options.

  • linestyles (list(str) or None) –

    List of linestyle to use for the plots.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to set matplotlib options.

  • markers (list(str) or None) –

    List of marker to use for the plots.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to set matplotlib options.

  • axis (matplotlib.axes.Axes or numpy.ndarray(matplotlib.axes.Axes) or None) –

    instance of matplotlib.axes.Axes to plot into. If None, a new figure and axis are created and returned.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to compose plot elements: http://holoviews.org/user_guide/Composing_Elements.html

  • rc_params (dict(str, object) or None) –

    Matplotlib rc params dictionary overlaid on existing settings.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to set matplotlib options.

  • _compat_render (bool) – Internal parameter not to be used. This enables the compatibility mode where render=True by default when matplotlib is the current holoviews backend.

Required trace events:
  • userspace@rtapp_stats

RTAEventsAnalysis.plot_perf_index_histogram(task: TaskID, bins: int = 30, *, filepath=None, output='holoviews', img_format=None, always_save=False, backend=None, _compat_render=False, link_dataframes=None, cursor_delta=None, width=None, height=None, rc_params=None, axis=None, interactive=None, colors: Sequence[str] = None, linestyles: Sequence[str] = None, markers: Sequence[str] = None, **kwargs)[source]#

bins=30, task=big_0-0

Called on Trace instances as trace.ana.rta.plot_perf_index_histogram()

Plot the perf index histogram.

Parameters:

See also

plot_perf() for the perf index definition.

Added by lisa.analysis.base.AnalysisHelpers.plot_method():

Returns:

The return type is determined by the output parameter.

Parameters:
  • backend (str or None) –

    Holoviews plot library backend to use:

    • bokeh: good support for interactive plots

    • matplotlib: sometimes better static image output, but unpredictable results that more often than not require a fair amount of hacks to get something good.

    • plotly: not supported by LISA but technically available. Since it’s very similar to bokeh feature-wise, bokeh should be preferred.

    Note

    In a notebook, the way to choose which backend should be used to display plots is typically selected with e.g. holoviews.extension('bokeh') at the beginning of the notebook. The backend parameter is more intended for expert use where an object of the given library is required, without depending on the environment.

  • link_dataframes (list(pandas.DataFrame) or None) – Gated by output="ui". List of dataframes to display under the figure, which is dynamically linked with it: clicking on the plot will scroll in the dataframes and vice versa.

  • filepath (str or None) – Path of the file to save the figure in. If None, no file is saved.

  • always_save (bool) – When True, the plot is always saved even if no filepath has explicitly been set. In that case, a default path will be used.

  • img_format (str) – The image format to generate. Defaults to using filepath to guess the type, or “png” if no filepath is given. html and rst are supported in addition to matplotlib image formats.

  • output (str or None) –

    Change the return value of the method:

    • None: Equivalent to holoviews for now. In the future, this will be either holoviews or ui if used in an interactive jupyter notebook.

    • holoviews: a bare holoviews element.

    • render: a backend-specific object, such as matplotlib.figure.Figure if backend='matplotlib'

    • html: HTML document

    • rst: a snippet of reStructuredText

    • ui: Pseudo holoviews figure, enriched with extra controls.

      Note

      No assumption must be made on the return type other than that it can be displayed in a notebook cell output (and with IPython.display.display()). The public API holoviews is implemented in a best-effort approach, so that .options() and .opts() will work, but compositions using e.g. x * y will not work if x is a holoviews element.

      In the midterm, the output type will be changed so that it is a real holoviews object, rather than some sort of proxy.

  • colors (list(str) or None) –

    List of color names to use for the plots.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to set matplotlib options.

  • linestyles (list(str) or None) –

    List of linestyle to use for the plots.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to set matplotlib options.

  • markers (list(str) or None) –

    List of marker to use for the plots.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to set matplotlib options.

  • axis (matplotlib.axes.Axes or numpy.ndarray(matplotlib.axes.Axes) or None) –

    instance of matplotlib.axes.Axes to plot into. If None, a new figure and axis are created and returned.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to compose plot elements: http://holoviews.org/user_guide/Composing_Elements.html

  • rc_params (dict(str, object) or None) –

    Matplotlib rc params dictionary overlaid on existing settings.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to set matplotlib options.

  • _compat_render (bool) – Internal parameter not to be used. This enables the compatibility mode where render=True by default when matplotlib is the current holoviews backend.

Required trace events:
  • userspace@rtapp_stats

RTAEventsAnalysis.plot_phases(task: TaskID, wlgen_profile=None, *, filepath=None, output='holoviews', img_format=None, always_save=False, backend=None, _compat_render=False, link_dataframes=None, cursor_delta=None, width=None, height=None, rc_params=None, axis=None, interactive=None, colors: Sequence[str] = None, linestyles: Sequence[str] = None, markers: Sequence[str] = None, **kwargs)[source]#

task=big_0-0, wlgen_profile={'small_0': , 'small_1': , 'small_2': , 'big_0': , 'big_1': }

Called on Trace instances as trace.ana.rta.plot_phases()

Draw the task’s phases colored bands

Parameters:

Added by lisa.analysis.base.AnalysisHelpers.plot_method():

Returns:

The return type is determined by the output parameter.

Parameters:
  • backend (str or None) –

    Holoviews plot library backend to use:

    • bokeh: good support for interactive plots

    • matplotlib: sometimes better static image output, but unpredictable results that more often than not require a fair amount of hacks to get something good.

    • plotly: not supported by LISA but technically available. Since it’s very similar to bokeh feature-wise, bokeh should be preferred.

    Note

    In a notebook, the way to choose which backend should be used to display plots is typically selected with e.g. holoviews.extension('bokeh') at the beginning of the notebook. The backend parameter is more intended for expert use where an object of the given library is required, without depending on the environment.

  • link_dataframes (list(pandas.DataFrame) or None) – Gated by output="ui". List of dataframes to display under the figure, which is dynamically linked with it: clicking on the plot will scroll in the dataframes and vice versa.

  • filepath (str or None) – Path of the file to save the figure in. If None, no file is saved.

  • always_save (bool) – When True, the plot is always saved even if no filepath has explicitly been set. In that case, a default path will be used.

  • img_format (str) – The image format to generate. Defaults to using filepath to guess the type, or “png” if no filepath is given. html and rst are supported in addition to matplotlib image formats.

  • output (str or None) –

    Change the return value of the method:

    • None: Equivalent to holoviews for now. In the future, this will be either holoviews or ui if used in an interactive jupyter notebook.

    • holoviews: a bare holoviews element.

    • render: a backend-specific object, such as matplotlib.figure.Figure if backend='matplotlib'

    • html: HTML document

    • rst: a snippet of reStructuredText

    • ui: Pseudo holoviews figure, enriched with extra controls.

      Note

      No assumption must be made on the return type other than that it can be displayed in a notebook cell output (and with IPython.display.display()). The public API holoviews is implemented in a best-effort approach, so that .options() and .opts() will work, but compositions using e.g. x * y will not work if x is a holoviews element.

      In the midterm, the output type will be changed so that it is a real holoviews object, rather than some sort of proxy.

  • colors (list(str) or None) –

    List of color names to use for the plots.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to set matplotlib options.

  • linestyles (list(str) or None) –

    List of linestyle to use for the plots.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to set matplotlib options.

  • markers (list(str) or None) –

    List of marker to use for the plots.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to set matplotlib options.

  • axis (matplotlib.axes.Axes or numpy.ndarray(matplotlib.axes.Axes) or None) –

    instance of matplotlib.axes.Axes to plot into. If None, a new figure and axis are created and returned.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to compose plot elements: http://holoviews.org/user_guide/Composing_Elements.html

  • rc_params (dict(str, object) or None) –

    Matplotlib rc params dictionary overlaid on existing settings.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to set matplotlib options.

  • _compat_render (bool) – Internal parameter not to be used. This enables the compatibility mode where render=True by default when matplotlib is the current holoviews backend.

Required trace events:
  • userspace@rtapp_loop

  • optional: (sched_switch and sched_wakeup and one group of: task_rename and optional: sched_wakeup_new)

RTAEventsAnalysis.plot_slack_histogram(task: TaskID, bins: int = 30, *, filepath=None, output='holoviews', img_format=None, always_save=False, backend=None, _compat_render=False, link_dataframes=None, cursor_delta=None, width=None, height=None, rc_params=None, axis=None, interactive=None, colors: Sequence[str] = None, linestyles: Sequence[str] = None, markers: Sequence[str] = None, **kwargs)[source]#

bins=30, task=big_0-0

Called on Trace instances as trace.ana.rta.plot_slack_histogram()

Plot the slack histogram.

Parameters:

See also

plot_perf() for the slack definition.

Added by lisa.analysis.base.AnalysisHelpers.plot_method():

Returns:

The return type is determined by the output parameter.

Parameters:
  • backend (str or None) –

    Holoviews plot library backend to use:

    • bokeh: good support for interactive plots

    • matplotlib: sometimes better static image output, but unpredictable results that more often than not require a fair amount of hacks to get something good.

    • plotly: not supported by LISA but technically available. Since it’s very similar to bokeh feature-wise, bokeh should be preferred.

    Note

    In a notebook, the way to choose which backend should be used to display plots is typically selected with e.g. holoviews.extension('bokeh') at the beginning of the notebook. The backend parameter is more intended for expert use where an object of the given library is required, without depending on the environment.

  • link_dataframes (list(pandas.DataFrame) or None) – Gated by output="ui". List of dataframes to display under the figure, which is dynamically linked with it: clicking on the plot will scroll in the dataframes and vice versa.

  • filepath (str or None) – Path of the file to save the figure in. If None, no file is saved.

  • always_save (bool) – When True, the plot is always saved even if no filepath has explicitly been set. In that case, a default path will be used.

  • img_format (str) – The image format to generate. Defaults to using filepath to guess the type, or “png” if no filepath is given. html and rst are supported in addition to matplotlib image formats.

  • output (str or None) –

    Change the return value of the method:

    • None: Equivalent to holoviews for now. In the future, this will be either holoviews or ui if used in an interactive jupyter notebook.

    • holoviews: a bare holoviews element.

    • render: a backend-specific object, such as matplotlib.figure.Figure if backend='matplotlib'

    • html: HTML document

    • rst: a snippet of reStructuredText

    • ui: Pseudo holoviews figure, enriched with extra controls.

      Note

      No assumption must be made on the return type other than that it can be displayed in a notebook cell output (and with IPython.display.display()). The public API holoviews is implemented in a best-effort approach, so that .options() and .opts() will work, but compositions using e.g. x * y will not work if x is a holoviews element.

      In the midterm, the output type will be changed so that it is a real holoviews object, rather than some sort of proxy.

  • colors (list(str) or None) –

    List of color names to use for the plots.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to set matplotlib options.

  • linestyles (list(str) or None) –

    List of linestyle to use for the plots.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to set matplotlib options.

  • markers (list(str) or None) –

    List of marker to use for the plots.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to set matplotlib options.

  • axis (matplotlib.axes.Axes or numpy.ndarray(matplotlib.axes.Axes) or None) –

    instance of matplotlib.axes.Axes to plot into. If None, a new figure and axis are created and returned.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to compose plot elements: http://holoviews.org/user_guide/Composing_Elements.html

  • rc_params (dict(str, object) or None) –

    Matplotlib rc params dictionary overlaid on existing settings.

    Deprecated since version 2.0: This parameter is deprecated, use holoviews APIs to set matplotlib options.

  • _compat_render (bool) – Internal parameter not to be used. This enables the compatibility mode where render=True by default when matplotlib is the current holoviews backend.

Required trace events:
  • userspace@rtapp_stats

RTAEventsAnalysis.task_phase_at(task, timestamp, wlgen_profile=None)[source]#

Called on Trace instances as trace.ana.rta.task_phase_at()

Return the PhaseWindow for the specified task and timestamp.

Parameters:
Returns:

the ID of the phase corresponding to the specified timestamp.

Required trace events:
  • userspace@rtapp_loop

RTAEventsAnalysis.task_phase_window(task, phase, wlgen_profile=None)[source]#

Called on Trace instances as trace.ana.rta.task_phase_window()

Return the window of a requested task phase.

For the specified task it returns a tuple with the (start, end) time of the requested phase. A negative phase number can be used to count phases backward from the last (-1) toward the first.

Parameters:
Return type:

PhaseWindow

Required trace events:
  • userspace@rtapp_loop

RTAEventsAnalysis.task_phase_windows(task, wlgen_profile=None)[source]#

Called on Trace instances as trace.ana.rta.task_phase_windows()

Yield a PhaseWindow for each rt-app phase of the specified task.

Parameters:
Returns:

Generator yielding PhaseWindow with start end end timestamps.

Required trace events:
  • userspace@rtapp_loop

RTAEventsAnalysis.task_window(task)[source]#

Called on Trace instances as trace.ana.rta.task_window()

Return the start end end time for the specified task.

Parameters:

task (int or str or lisa.analysis.tasks.TaskID) – the rt-app task to filter for

Required trace events:
  • userspace@rtapp_task

classmethod RTAEventsAnalysis.cache(f, fmt='parquet', ignored_params=None)#

Inherited method, see lisa.analysis.base.TraceAnalysisBase.cache()

Decorator to enable caching of the output of dataframe getter function in the trace cache.

classmethod RTAEventsAnalysis.call_on_trace(meth, trace, meth_kwargs)#

Inherited method, see lisa.analysis.base.TraceAnalysisBase.call_on_trace()

Call a method of a subclass on a given trace.

classmethod RTAEventsAnalysis.df_method(f, index=None)#

Inherited method, see lisa.analysis.base.TraceAnalysisBase.df_method()

Dataframe function decorator.

classmethod RTAEventsAnalysis.get_all_events()#

Inherited method, see lisa.analysis.base.TraceAnalysisBase.get_all_events()

Returns the set of all events used by any of the methods.

classmethod RTAEventsAnalysis.get_analysis_classes()#

Inherited method, see lisa.analysis.base.TraceAnalysisBase.get_analysis_classes()

RTAEventsAnalysis.get_default_plot_path(**kwargs)#

Inherited method, see lisa.analysis.base.TraceAnalysisBase.get_default_plot_path()

Return the default path to use to save plots for the analysis.

classmethod RTAEventsAnalysis.get_df_methods(*args, **kwargs)#

Inherited method, see lisa.analysis.base.TraceAnalysisBase.get_df_methods()

classmethod RTAEventsAnalysis.get_logger(suffix=None)#

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

Provides a logging.Logger named after cls.

classmethod RTAEventsAnalysis.get_plot_methods(*args, **kwargs)#

Inherited method, see lisa.analysis.base.AnalysisHelpers.get_plot_methods()

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

classmethod RTAEventsAnalysis.plot_method(f)#

Inherited method, see lisa.analysis.base.AnalysisHelpers.plot_method()

Plot function decorator.

RTAEventsAnalysis.save_plot(figure, filepath=None, img_format=None, backend=None)#

Inherited method, see lisa.analysis.base.AnalysisHelpers.save_plot()

Save a holoviews element or matplotlib.figure.Figure as an image file.