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
List of ftrace events rtapp is able to emit.
Name of the analysis class.
Properties
Return the tuple representing the
kernel
anduser
timestamp.List of
lisa.analysis.tasks.TaskID
of thert-app
tasks present in the trace.Return the time range the rt-app main thread executed.
logger
inheritedConvenience short-hand for
self.get_logger()
.Methods
Get phases actual start times and durations.
Returns a
pandas.DataFrame
of all the rt-app generated events.Dataframe of events generated by each rt-app generated task.
Dataframe of events generated by the rt-app main task.
End of the specified phase for a given task.
Start of the specified phase for a given task.
Dataframe of phases end times.
Dataframe of phases start times.
Returns a
pandas.DataFrame
of all the rt-app generated stats.Dataframe of events generated by each rt-app generated task.
Plot the Latency/Slack and Performance data for the specified task.
Plot the performance index.
Plot the perf index histogram.
Draw the task’s phases colored bands.
Plot the slack histogram.
Return the
PhaseWindow
for the specified task and timestamp.Return the window of a requested task phase.
Yield a
PhaseWindow
for each rt-app phase of the specified task.Return the start end end time for the specified task.
cache()
inheritedDecorator to enable caching of the output of dataframe getter function in the trace cache.
call_on_trace()
inheritedCall a method of a subclass on a given trace.
df_method()
inheritedDataframe function decorator.
get_all_events()
inheritedReturns the set of all events used by any of the methods.
get_analysis_classes()
inheritedget_default_plot_path()
inheritedReturn the default path to use to save plots for the analysis.
get_df_methods()
inheritedget_logger()
inheritedProvides a
logging.Logger
named aftercls
.get_plot_methods()
inheritedlog_locals()
inheritedDebugging aid: log the local variables of the calling function.
plot_method()
inheritedPlot function decorator.
save_plot()
inheritedSave 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
anduser
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
reportingkernel
anduser
timestamps.- Required trace events:
userspace@rtapp_main
- property RTAEventsAnalysis.rtapp_tasks[source]#
List of
lisa.analysis.tasks.TaskID
of thert-app
tasks present in the trace.- Required trace events:
userspace@rtapp_main
oruserspace@rtapp_task
oruserspace@rtapp_loop
oruserspace@rtapp_event
oruserspace@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 astrace.ana.rta.df_phases()
Get phases actual start times and durations
- Parameters:
task (int or str or lisa.analysis.tasks.TaskID) – the rt-app task to filter for
wlgen_profile (dict(str, lisa.wlgen.rta.RTAPhase) or None) – See
df_rtapp_loop()
- Returns:
A
pandas.DataFrame
with index representing the start time of a phase and these column:phase
: the phase number or its name extracted fromwlgen_profile
.duration
: the measured phase duration.properties
: the properties mapping of the phase extracted fromwlgen_profile
.
Added by
lisa.analysis.base.TraceAnalysisBase.df_method()
:- Parameters:
df_fmt (str or None) –
Format of dataframe to return. One of:
"pandas"
:pandas.DataFrame
"polars-lazyframe"
:polars.LazyFrame
- 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 astrace.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 nameA
__pid
column: the PID of the taskA
__cpu
column: the CPU on which the task was running at event generation timeA
__line
column: the ftrace line numerA
type
column: the type of the generated eventA
desc
column: the mnemonic type of the generated eventA
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:
"pandas"
:pandas.DataFrame
"polars-lazyframe"
:polars.LazyFrame
- 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 astrace.ana.rta.df_rtapp_loop()
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
wlgen_profile (dict(str, lisa.wlgen.rta.RTAPhase) or None) – Dictionary of rt-app task names to
RTAPhase
used to resolve phase name from the trace and will add aproperties
column with theRTAPhase
properties.
- Returns:
a
pandas.DataFrame
with:A
__comm
column: the actual rt-app trace task nameA
__cpu
column: the CPU on which the task was running at event generation timeA
__line
column: the ftrace line numerA
__pid
column: the PID of the taskAn
event
column: the generated event:start
: the start of the__pid
:__comm
related eventend
: the end of the__pid
:__comm
related event
A
phase
column: the phases counter for each__pid
:__comm
taskA
phase_loop
colum: the phase_loops’s counterA
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:
"pandas"
:pandas.DataFrame
"polars-lazyframe"
:polars.LazyFrame
- 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 astrace.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 nameA
__cpu
column: the CPU on which the task was running at event generation timeA
__pid
column: the PID of the taskA
data
column: the data corresponding to the reported event:the base timestamp used for logfile generated event for the
clock_ref
eventNaN
for all the other events
An
event
column: the event generated:start
: the start of the rt-app main thread executionend
: the end of the rt-app main thread executionclock_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:
"pandas"
:pandas.DataFrame
"polars-lazyframe"
:polars.LazyFrame
- 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 astrace.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:
task (int or str or lisa.analysis.tasks.TaskID) – the rt-app task to filter for
phase (int or str) – the id (or name with
wlgen_profile
) of the phase end to return.wlgen_profile (dict(str, lisa.wlgen.rta.RTAPhaseBase) or None) – See
df_rtapp_loop()
- 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:
"pandas"
:pandas.DataFrame
"polars-lazyframe"
:polars.LazyFrame
- 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 astrace.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:
task (int or str or lisa.analysis.tasks.TaskID) – the rt-app task to filter for
phase (int or str) – the ID (or name with
wlgen_profile
) of the phase start to return.wlgen_profile (dict(str, lisa.wlgen.rta.RTAPhaseBase) or None) – See
df_rtapp_loop()
- 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:
"pandas"
:pandas.DataFrame
"polars-lazyframe"
:polars.LazyFrame
- 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 astrace.ana.rta.df_rtapp_phases_end()
Dataframe of phases end times.
- Parameters:
task (int or str or lisa.analysis.tasks.TaskID) – the (optional) rt-app task to filter for
wlgen_profile (dict(str, lisa.wlgen.rta.RTAPhaseBase) or None) – See
df_rtapp_loop()
- Returns:
a
pandas.DataFrame
with:A
__comm
column: the actual rt-app trace task nameA
__pid
column: the PID of the taskA
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:
"pandas"
:pandas.DataFrame
"polars-lazyframe"
:polars.LazyFrame
- 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 astrace.ana.rta.df_rtapp_phases_start()
Dataframe of phases start times.
- Parameters:
task (int or str or lisa.analysis.tasks.TaskID) – the (optional) rt-app task to filter for
wlgen_profile (dict(str, lisa.wlgen.rta.RTAPhaseBase) or None) – See
df_rtapp_loop()
- Returns:
a
pandas.DataFrame
with:A
__comm
column: the actual rt-app trace task nameA
__pid
column: the PID of the taskA
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:
"pandas"
:pandas.DataFrame
"polars-lazyframe"
:polars.LazyFrame
- 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 astrace.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 nameA
__pid
column: the PID of the taskA
__cpu
column: the CPU on which the task was running at event generation timeA
__line
column: the ftrace line numerA
type
column: the type of the generated eventA
desc
column: the mnemonic type of the generated eventA
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:
"pandas"
:pandas.DataFrame
"polars-lazyframe"
:polars.LazyFrame
- 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 astrace.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 nameA
__cpu
column: the CPU on which the task was running at event generation timeA
__line
column: the ftrace line numerA
__pid
column: the PID of the taskAn
event
column: the event generated:start
: the start of the__pid
:__comm
task executionend
: 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:
"pandas"
:pandas.DataFrame
"polars-lazyframe"
:polars.LazyFrame
- 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 astrace.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 plotsmatplotlib
: 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. Thebackend
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 nofilepath
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 toholoviews
for now. In the future, this will be eitherholoviews
orui
if used in an interactive jupyter notebook.holoviews
: a bare holoviews element.render
: a backend-specific object, such asmatplotlib.figure.Figure
ifbackend='matplotlib'
html
: HTML documentrst
: a snippet of reStructuredTextui
: 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 ifx
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.
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.
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 astrace.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 activationc_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 plotsmatplotlib
: 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. Thebackend
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 nofilepath
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 toholoviews
for now. In the future, this will be eitherholoviews
orui
if used in an interactive jupyter notebook.holoviews
: a bare holoviews element.render
: a backend-specific object, such asmatplotlib.figure.Figure
ifbackend='matplotlib'
html
: HTML documentrst
: a snippet of reStructuredTextui
: 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 ifx
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.
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.
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 astrace.ana.rta.plot_perf_index_histogram()
Plot the perf index histogram.
- Parameters:
task (int or str or lisa.analysis.tasks.TaskID) – the rt-app task to filter for
bins (int) – number of bins for the histogram.
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 plotsmatplotlib
: 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. Thebackend
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 nofilepath
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 toholoviews
for now. In the future, this will be eitherholoviews
orui
if used in an interactive jupyter notebook.holoviews
: a bare holoviews element.render
: a backend-specific object, such asmatplotlib.figure.Figure
ifbackend='matplotlib'
html
: HTML documentrst
: a snippet of reStructuredTextui
: 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 ifx
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.
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.
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 astrace.ana.rta.plot_phases()
Draw the task’s phases colored bands
- Parameters:
task (int or str or lisa.analysis.tasks.TaskID) – the rt-app task to filter for
wlgen_profile (dict(str, lisa.wlgen.rta.RTAPhase) or None) – See
df_rtapp_loop()
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 plotsmatplotlib
: 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. Thebackend
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 nofilepath
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 toholoviews
for now. In the future, this will be eitherholoviews
orui
if used in an interactive jupyter notebook.holoviews
: a bare holoviews element.render
: a backend-specific object, such asmatplotlib.figure.Figure
ifbackend='matplotlib'
html
: HTML documentrst
: a snippet of reStructuredTextui
: 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 ifx
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.
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.
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
andsched_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 astrace.ana.rta.plot_slack_histogram()
Plot the slack histogram.
- Parameters:
task (int or str or lisa.analysis.tasks.TaskID) – the rt-app task to filter for
bins (int) – number of bins for the histogram.
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 plotsmatplotlib
: 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. Thebackend
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 nofilepath
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 toholoviews
for now. In the future, this will be eitherholoviews
orui
if used in an interactive jupyter notebook.holoviews
: a bare holoviews element.render
: a backend-specific object, such asmatplotlib.figure.Figure
ifbackend='matplotlib'
html
: HTML documentrst
: a snippet of reStructuredTextui
: 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 ifx
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.
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.
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 astrace.ana.rta.task_phase_at()
Return the
PhaseWindow
for the specified task and timestamp.- Parameters:
task (int or str or lisa.analysis.tasks.TaskID) – the rt-app task to filter for
timestamp (int or float) – the timestamp to get the phase for
wlgen_profile (dict(str, lisa.wlgen.rta.RTAPhaseBase) or None) – See
df_rtapp_loop()
- 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 astrace.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 requestedphase
. A negative phase number can be used to count phases backward from the last (-1) toward the first.- Parameters:
task (int or str or lisa.analysis.tasks.TaskID) – the rt-app task to filter for
phase (int or str) – the ID (or name with
wlgen_profile
) of the phase to consider.wlgen_profile (dict(str, lisa.wlgen.rta.RTAPhaseBase) or None) – See
df_rtapp_loop()
- Return type:
- Required trace events:
userspace@rtapp_loop
- RTAEventsAnalysis.task_phase_windows(task, wlgen_profile=None)[source]#
Called on
Trace
instances astrace.ana.rta.task_phase_windows()
Yield a
PhaseWindow
for each rt-app phase of the specified task.- Parameters:
task (int or str or lisa.analysis.tasks.TaskID) – the rt-app task to filter for
wlgen_profile (dict(str, lisa.wlgen.rta.RTAPhaseBase) or None) – See
df_phases()
.
- Returns:
Generator yielding
PhaseWindow
with start end end timestamps.- Required trace events:
userspace@rtapp_loop
- RTAEventsAnalysis.task_window(task)[source]#
Called on
Trace
instances astrace.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 aftercls
.
- 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.