lisa.analysis.tasks.TasksAnalysis#
- class lisa.analysis.tasks.TasksAnalysis(trace, proxy=None)[source]#
Bases:
TraceAnalysisBase
Support for Tasks signals analysis.
- Parameters:
trace (lisa.trace.Trace) – input Trace object
Attributes
Name of the analysis class.
Properties
List of all the
TaskID
in the trace, sorted by PID.logger
inheritedConvenience short-hand for
self.get_logger()
.Methods
Return the list of CPUs where the
tasks
executed.Tasks with RT priority.
DataFrame of a task’s active time on a given CPU.
DataFrame of task’s state updates events.
DataFrame of a task’s execution time on each CPU.
DataFrame of the time each task spent in TASK_ACTIVE (
TaskState
).DataFrame of all tasks state updates events.
DataFrame of tasks execution time on each CPU.
The number of wakeups per task.
Tasks which wakeup more frequently than a specified threshold.
Helper that resolves a task PID or name to a
TaskID
.Similar to
get_task_id()
but returns a list with all the combinations, instead of raising an exception.Get the PIDs of all tasks with the specified name.
Get the all the names of the task(s) with the specified PID, in appearance order.
Get a dictionary of all the tasks in the Trace.
Plot on which CPUs the task ran on over time.
Plot a task’s total time spent on each CPU.
Plot all tasks activations, in a style similar to kernelshark.
Plot task forks over time.
Plot number of task forks over time as a heatmap.
Plot the stacked total time spent by each task on each CPU.
Plot task wakeups over time.
Plot tasks wakeups heatmap.
Adds stringified
TaskState
columns to a Dataframe.Stringify a series containing
TaskState
values.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#
- TasksAnalysis.name = 'tasks'#
Name of the analysis class.
Properties#
- property TasksAnalysis.logger#
Inherited property, see
lisa.utils.Loggable.logger
Convenience short-hand for
self.get_logger()
.
Methods#
- TasksAnalysis.cpus_of_tasks(tasks)[source]#
Called on
Trace
instances astrace.ana.tasks.cpus_of_tasks()
Return the list of CPUs where the
tasks
executed.
- TasksAnalysis.df_rt_tasks(min_prio=99, *, df_fmt=None)[source]#
Called on
Trace
instances astrace.ana.tasks.df_rt_tasks()
Tasks with RT priority
Note
priorities uses scheduler values, thus: the lower the value the higher is the task priority. RT Priorities: [ 0..99] FAIR Priorities: [100..120]
Note
RT and DL (deadline) tasks share the priority 0 on modern kernels. Since this method only filters by priority, it will also select DL tasks as a result.
- Parameters:
min_prio (int) – minimum priority
- Returns:
a
pandas.DataFrame
with:Task PIDs as index
A
prio
column (The priority of the task)A
comm
column (The name of the task)
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:
sched_switch
- TasksAnalysis.df_task_activation(task, cpu=None, active_value=1, sleep_value=0, preempted_value=nan, *, df_fmt=None)[source]#
Called on
Trace
instances astrace.ana.tasks.df_task_activation()
DataFrame of a task’s active time on a given CPU
- Parameters:
task (int or str or tuple(int, str)) – the task to report activations of
cpu (int or None) – the CPUs to look at. If
None
, all CPUs will be used.active_value (float) – the value to use in the series when task is active.
sleep_value (float) – the value to use in the series when task is sleeping.
preempted_value – the value to use in the series when task is preempted (runnable but not actually executing).
- Returns:
a
pandas.DataFrame
with:A timestamp as index
A
active
column, containingactive_value
when the task is running,sleep_value
when sleeping, andpreempted_value
otherwise.A
cpu
column with the CPU the task was running on.A
duration
column containing the duration of the current sleep or activation.A
duty_cycle
column containing the duty cycle in[0...1]
of the task, updated at each pair of activation and sleep.
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:
sched_switch
sched_wakeup
one group of:
task_rename
optional:
sched_wakeup_new
- TasksAnalysis.df_task_states(task, stringify=False, *, df_fmt=None)[source]#
Called on
Trace
instances astrace.ana.tasks.df_task_states()
DataFrame of task’s state updates events
- Parameters:
- Returns:
a
pandas.DataFrame
with:A
cpu
column (the CPU where the event took place)A
target_cpu
column (the CPU where the task has been scheduled). Will be-1
for non-wakeup eventsA
curr_state
column (the current task state, seeTaskState
)A
next_state
column (the next task state)A
delta
column (the duration for which the task will remain in this state)
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:
sched_switch
sched_wakeup
one group of:
task_rename
optional:
sched_wakeup_new
- TasksAnalysis.df_task_total_residency(task, *, df_fmt=None)[source]#
Called on
Trace
instances astrace.ana.tasks.df_task_total_residency()
DataFrame of a task’s execution time on each CPU
- Parameters:
task (int or str or tuple(int, str)) – the task to report runtimes for
- Returns:
a
pandas.DataFrame
with:CPU IDs as index
A
runtime
column (the time the task spent being active)
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:
sched_switch
sched_wakeup
one group of:
task_rename
optional:
sched_wakeup_new
- TasksAnalysis.df_tasks_runtime(*, df_fmt=None)[source]#
Called on
Trace
instances astrace.ana.tasks.df_tasks_runtime()
DataFrame of the time each task spent in TASK_ACTIVE (
TaskState
)- Returns:
a
pandas.DataFrame
with:PIDs as index
A
comm
column (the name of the task)A
runtime
column (the time that task spent running)
Note
This function only tracks time spent by each PID. The reported name is the last name associated with the PID in chronological order.
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:
sched_switch
sched_wakeup
one group of:
task_rename
optional:
sched_wakeup_new
- TasksAnalysis.df_tasks_states(*, df_fmt=None)[source]#
Called on
Trace
instances astrace.ana.tasks.df_tasks_states()
DataFrame of all tasks state updates events
- Returns:
a
pandas.DataFrame
with:A
cpu
column (the CPU where the event took place)A
pid
column (the PID of the task)A
comm
column (the name of the task)A
target_cpu
column (the CPU where the task has been scheduled). Will beNaN
for non-wakeup eventsA
curr_state
column (the current task state, seeTaskState
)A
delta
column (the duration for which the task will remain in this state)A
next_state
column (the next task state)
Warning
Since
sched_switch
event multiplexes the update to two PIDs at the same time, the resulting dataframe would contain duplicated indices, breaking some Pandas functions. In order to avoid that, the duplicated timestamps are updated with the minimum increment possible to remove duplication.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:
sched_switch
sched_wakeup
one group of:
task_rename
optional:
sched_wakeup_new
- TasksAnalysis.df_tasks_total_residency(tasks=None, ascending=False, count=None, *, df_fmt=None)[source]#
Called on
Trace
instances astrace.ana.tasks.df_tasks_total_residency()
DataFrame of tasks execution time on each CPU
- Parameters:
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:
sched_switch
sched_wakeup
one group of:
task_rename
optional:
sched_wakeup_new
- TasksAnalysis.df_tasks_wakeups(*, df_fmt=None)[source]#
Called on
Trace
instances astrace.ana.tasks.df_tasks_wakeups()
The number of wakeups per task
- Returns:
a
pandas.DataFrame
with:Task PIDs as index
A
wakeups
column (The number of wakeups)
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:
sched_wakeup
- TasksAnalysis.df_top_wakeup(min_wakeups=100, *, df_fmt=None)[source]#
Called on
Trace
instances astrace.ana.tasks.df_top_wakeup()
Tasks which wakeup more frequently than a specified threshold.
- Parameters:
min_wakeups (int) – minimum number of wakeups
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:
sched_wakeup
- TasksAnalysis.get_task_id(task, update=True)[source]#
Called on
Trace
instances astrace.ana.tasks.get_task_id()
Helper that resolves a task PID or name to a
TaskID
.- Parameters:
- Raises:
ValueError – If there the input matches multiple tasks in the trace. See
get_task_ids()
to get all the ambiguous alternatives instead of an exception.
- TasksAnalysis.get_task_ids(task, update=True)[source]#
Called on
Trace
instances astrace.ana.tasks.get_task_ids()
Similar to
get_task_id()
but returns a list with all the combinations, instead of raising an exception.
- TasksAnalysis.get_task_name_pids(name, ignore_fork=True)[source]#
Called on
Trace
instances astrace.ana.tasks.get_task_name_pids()
Get the PIDs of all tasks with the specified name.
The same PID can have different task names, mainly because once a task is generated it inherits the parent name and then its name is updated to represent what the task really is.
- Parameters:
- Returns:
a list of PID for tasks which name matches the required one.
- TasksAnalysis.get_task_pid_names(pid)[source]#
Called on
Trace
instances astrace.ana.tasks.get_task_pid_names()
Get the all the names of the task(s) with the specified PID, in appearance order.
The same PID can have different task names, mainly because once a task is generated it inherits the parent name and then its name is updated to represent what the task really is.
- Parameters:
name (int) – task PID
- Returns:
the name of the task which PID matches the required one, the last time they ran in the current trace
- TasksAnalysis.get_tasks()[source]#
Called on
Trace
instances astrace.ana.tasks.get_tasks()
Get a dictionary of all the tasks in the Trace.
- Returns:
a dictionary which maps each PID to the corresponding list of task name
- TasksAnalysis.plot_task_residency(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.tasks.plot_task_residency()
Plot on which CPUs the task ran on over time
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:
sched_switch
- TasksAnalysis.plot_task_total_residency(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.tasks.plot_task_total_residency()
Plot a task’s total time spent on each CPU
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:
sched_switch
sched_wakeup
one group of:
task_rename
optional:
sched_wakeup_new
- TasksAnalysis.plot_tasks_activation(tasks: Sequence[TaskID] = None, hide_tasks: Sequence[TaskID] = None, which_cpu: bool = True, overlay: bool = None, *, show_legend=None, cpu: CPU = None, alpha: float = None, duration: bool = False, duty_cycle: bool = False, height_duty_cycle: bool = False, 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]#
duration=False, duty_cycle=False, height_duty_cycle=False, which_cpu=True
Called on
Trace
instances astrace.ana.tasks.plot_tasks_activation()
Plot all tasks activations, in a style similar to kernelshark.
- Parameters:
tasks (list(TaskID) or None) – Tasks to plot. If
None
, all tasks in the trace will be used.hide_tasks (list(TaskID) or None) – Tasks to hide. Note that PID 0 (idle task) will always be hidden.
alpha – transparency level of the plot.
overlay – If
True
, adjust the transparency and plot activations on a separate hidden scale so existing scales are not modified.duration (bool) – Plot the duration of each sleep/activation.
duty_cycle (bool) – Plot the duty cycle of each pair of sleep/activation.
which_cpu (bool) – If
True
, plot the activations on each CPU in a separate row like kernelshark does.height_duty_cycle (bool) – Height of each activation’s rectangle is proportional to the duty cycle during that activation.
See also
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:
sched_switch
sched_wakeup
one group of:
task_rename
optional:
sched_wakeup_new
- TasksAnalysis.plot_tasks_forks(target_cpus: Sequence[CPU] = None, window: float = 0.01, per_sec: bool = False, *, 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]#
per_sec=False, window=0.01
Called on
Trace
instances astrace.ana.tasks.plot_tasks_forks()
Plot task forks over time
- 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 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:
sched_wakeup_new
- TasksAnalysis.plot_tasks_forks_heatmap(bins: int = 100, xbins=None, colormap=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]#
bins=100
Called on
Trace
instances astrace.ana.tasks.plot_tasks_forks_heatmap()
Plot number of task forks over time as a heatmap.
- Parameters:
bins (int) – Number of x-axis bins, i.e. in how many slices should time be arranged
colormap (str) –
The name of a colormap:
matplotlib backend: https://matplotlib.org/stable/tutorials/colors/colormaps.html
bokeh backend: https://docs.bokeh.org/en/latest/docs/reference/palettes.html
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:
sched_wakeup_new
- TasksAnalysis.plot_tasks_total_residency(tasks: Sequence[TaskID] = None, ascending: bool = False, count: bool = 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]#
ascending=False
Called on
Trace
instances astrace.ana.tasks.plot_tasks_total_residency()
Plot the stacked total time spent by each task on each CPU
- 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 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:
sched_switch
sched_wakeup
one group of:
task_rename
optional:
sched_wakeup_new
- TasksAnalysis.plot_tasks_wakeups(target_cpus: Sequence[CPU] = None, window: float = 0.01, per_sec: bool = False, *, 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]#
per_sec=False, window=0.01
Called on
Trace
instances astrace.ana.tasks.plot_tasks_wakeups()
Plot task wakeups over time
- 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 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.
- TasksAnalysis.plot_tasks_wakeups_heatmap(bins: int = 100, xbins=None, colormap=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]#
bins=100
Called on
Trace
instances astrace.ana.tasks.plot_tasks_wakeups_heatmap()
Plot tasks wakeups heatmap
- Parameters:
bins (int) – Number of x-axis bins, i.e. in how many slices should time be arranged
colormap (str) –
The name of a colormap:
matplotlib backend: https://matplotlib.org/stable/tutorials/colors/colormaps.html
bokeh backend: https://docs.bokeh.org/en/latest/docs/reference/palettes.html
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:
sched_wakeup
- classmethod TasksAnalysis.stringify_df_task_states(df, columns, inplace=False)[source]#
Called on
Trace
instances astrace.ana.tasks.stringify_df_task_states()
Adds stringified
TaskState
columns to a Dataframe- Parameters:
df (pandas.DataFrame) – The DataFrame to operate on
columns (list) – The columns to stringify
inplace (bool) – Do the modification on the original DataFrame
- classmethod TasksAnalysis.stringify_task_state_series(series)[source]#
Called on
Trace
instances astrace.ana.tasks.stringify_task_state_series()
Stringify a series containing
TaskState
values- Parameters:
series (pandas.Series) – The series
The common use case for this will be to pass a dataframe column:
df["state_str"] = stringify_task_state_series(df["state"])
- classmethod TasksAnalysis.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 TasksAnalysis.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 TasksAnalysis.df_method(f, index=None)#
Inherited method, see
lisa.analysis.base.TraceAnalysisBase.df_method()
Dataframe function decorator.
- classmethod TasksAnalysis.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 TasksAnalysis.get_analysis_classes()#
Inherited method, see
lisa.analysis.base.TraceAnalysisBase.get_analysis_classes()
- TasksAnalysis.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 TasksAnalysis.get_df_methods(*args, **kwargs)#
Inherited method, see
lisa.analysis.base.TraceAnalysisBase.get_df_methods()
- classmethod TasksAnalysis.get_logger(suffix=None)#
Inherited method, see
lisa.utils.Loggable.get_logger()
Provides a
logging.Logger
named aftercls
.
- classmethod TasksAnalysis.get_plot_methods(*args, **kwargs)#
Inherited method, see
lisa.analysis.base.AnalysisHelpers.get_plot_methods()
- classmethod TasksAnalysis.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 TasksAnalysis.plot_method(f)#
Inherited method, see
lisa.analysis.base.AnalysisHelpers.plot_method()
Plot function decorator.
- TasksAnalysis.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.
- TasksAnalysis.get_task_by_pid(pid)[source]#
Called on
Trace
instances astrace.ana.tasks.get_task_by_pid()
Get the name of the task with the specified PID.
The same PID can have different task names, mainly because once a task is generated it inherits the parent name and then its name is updated to represent what the task really is.
This API works under the assumption that a task name is updated at most one time and it always report the name the task had the last time it has been scheduled for execution in the current trace.
- Parameters:
name (int) – task PID
- Returns:
the name of the task which PID matches the required one, the last time they ran in the current trace
Deprecated since version 2.0.
get_task_by_pid()
is deprecated and will be removed in version 4.0, uselisa.analysis.tasks.TasksAnalysis.get_task_pid_names()
instead: This function raises exceptions when faced with ambiguity instead of giving the choice to the user
- TasksAnalysis.get_task_pid(task)[source]#
Called on
Trace
instances astrace.ana.tasks.get_task_pid()
Helper that takes either a name or a PID and always returns a PID
Deprecated since version 2.0.
get_task_pid()
is deprecated and will be removed in version 4.0, uselisa.analysis.tasks.TasksAnalysis.get_task_id()
instead
- TasksAnalysis.plot_task_activation(task: TaskID, *, hide_tasks: Sequence[TaskID] = None, which_cpu: bool = True, overlay: bool = None, show_legend=None, cpu: CPU = None, alpha: float = None, duration: bool = False, duty_cycle: bool = False, height_duty_cycle: bool = False, 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]#
duration=True, duty_cycle=False, height_duty_cycle=False, task=big_0-0, which_cpu=True
Called on
Trace
instances astrace.ana.tasks.plot_task_activation()
Plot task activations, in a style similar to kernelshark.
See also
Deprecated since version 2.0.
plot_task_activation()
is deprecated and will be removed in version 4.0, uselisa.analysis.tasks.TasksAnalysis.plot_tasks_activation()
instead: Deprecated since it does not provide anything more than plot_tasks_activationAdded 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:
sched_switch
sched_wakeup
one group of:
task_rename
optional:
sched_wakeup_new