lisa.analysis.frequency.FrequencyAnalysis#
- class lisa.analysis.frequency.FrequencyAnalysis(trace, proxy=None)[source]#
Bases:
TraceAnalysisBase
Support for plotting Frequency Analysis data
- Parameters:
trace (lisa.trace.Trace) – input Trace object
Attributes
Name of the analysis class.
Properties
logger
inheritedConvenience short-hand for
self.get_logger()
.Methods
Same as
df_cpus_frequency()
but for a single CPU.Get per-CPU frequency residency, i.e. amount of time CPU cpu spent at each frequency.
Compute frequency transition rate of a given CPU.
Compute number of frequency transitions of a given CPU.
Similar to
trace.df_event('cpu_frequency')
, withuserspace@cpu_frequency_devlib
support.Get per-frequency-domain frequency residency, i.e. amount of time each domain at each frequency.
Dataframe of peripheral clock frequencies.
Get the average frequency for a given CPU.
Plot frequency for the specified CPU.
Plot per-CPU frequency residency.
Plot frequency transitions count of the specified CPU.
Plot frequency trend for all frequency domains.
Plot the frequency residency for all frequency domains.
Plot frequency transitions count for all frequency domains.
Plot frequency for the specified peripheral clock frequency.
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#
- FrequencyAnalysis.name = 'frequency'#
Name of the analysis class.
Properties#
- property FrequencyAnalysis.logger#
Inherited property, see
lisa.utils.Loggable.logger
Convenience short-hand for
self.get_logger()
.
Methods#
- FrequencyAnalysis.df_cpu_frequency(cpu, *, df_fmt=None, **kwargs)[source]#
Called on
Trace
instances astrace.ana.frequency.df_cpu_frequency()
Same as
df_cpus_frequency()
but for a single CPU.- Parameters:
cpu (int) – CPU ID to get the frequency of.
- Variable keyword arguments:
Forwarded to
df_cpus_frequency()
.
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:
cpu_frequency
oruserspace@cpu_frequency_devlib
- FrequencyAnalysis.df_cpu_frequency_residency(cpu, *, df_fmt=None)[source]#
Called on
Trace
instances astrace.ana.frequency.df_cpu_frequency_residency()
Get per-CPU frequency residency, i.e. amount of time CPU cpu spent at each frequency.
- Parameters:
cpu (int) – CPU ID
- Returns:
A
pandas.DataFrame
with:A
total_time
column (the total time spent at a frequency)A
active_time
column (the non-idle time spent at a frequency)
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:
cpu_frequency
oruserspace@cpu_frequency_devlib
cpu_idle
- FrequencyAnalysis.df_cpu_frequency_transition_rate(cpu, *, df_fmt=None)[source]#
Called on
Trace
instances astrace.ana.frequency.df_cpu_frequency_transition_rate()
Compute frequency transition rate of a given CPU.
- Parameters:
cpu (int) – a CPU ID
- Returns:
A
pandas.DataFrame
with:A
transitions
column (the number of frequency transitions per second)
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:
cpu_frequency
oruserspace@cpu_frequency_devlib
- FrequencyAnalysis.df_cpu_frequency_transitions(cpu, *, df_fmt=None)[source]#
Called on
Trace
instances astrace.ana.frequency.df_cpu_frequency_transitions()
Compute number of frequency transitions of a given CPU.
- Parameters:
cpu (int) – a CPU ID
- Returns:
A
pandas.DataFrame
with:A
transitions
column (the number of frequency transitions)
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:
cpu_frequency
oruserspace@cpu_frequency_devlib
- FrequencyAnalysis.df_cpus_frequency(signals_init=True, *, df_fmt=None)[source]#
Called on
Trace
instances astrace.ana.frequency.df_cpus_frequency()
Similar to
trace.df_event('cpu_frequency')
, withuserspace@cpu_frequency_devlib
support.- Parameters:
signals_init – If
True
, and initial value for signals will be provided. This includes initial value taken outside window boundaries and devlib-provided events.
The
userspace@cpu_frequency_devlib
user event is merged in the dataframe if it provides earlier values for a CPU.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:
cpu_frequency
oruserspace@cpu_frequency_devlib
- FrequencyAnalysis.df_domain_frequency_residency(cpu, *, df_fmt=None)[source]#
Called on
Trace
instances astrace.ana.frequency.df_domain_frequency_residency()
Get per-frequency-domain frequency residency, i.e. amount of time each domain at each frequency.
- Parameters:
cpu (int) – Any CPU of the domain to analyse
- Returns:
A
pandas.DataFrame
with:A
total_time
column (the total time spent at a frequency)A
active_time
column (the non-idle time spent at a frequency)
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:
cpu_frequency
oruserspace@cpu_frequency_devlib
cpu_idle
- FrequencyAnalysis.df_peripheral_clock_effective_rate(clk_name, *, df_fmt=None)[source]#
Called on
Trace
instances astrace.ana.frequency.df_peripheral_clock_effective_rate()
Dataframe of peripheral clock frequencies.
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:
clk_set_rate
clk_enable
clk_disable
- FrequencyAnalysis.get_average_cpu_frequency(cpu)[source]#
Called on
Trace
instances astrace.ana.frequency.get_average_cpu_frequency()
Get the average frequency for a given CPU
- Parameters:
cpu (int) – The CPU to analyse
- Required trace events:
cpu_frequency
oruserspace@cpu_frequency_devlib
- FrequencyAnalysis.plot_cpu_frequencies(cpu: CPU, average: bool = True, overutilized: bool = True, *, 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]#
average=True, cpu=0, overutilized=True
Called on
Trace
instances astrace.ana.frequency.plot_cpu_frequencies()
Plot frequency for the specified CPU
- Parameters:
If
sched_overutilized
events are available, the plots will also show the intervals of time where the system was overutilized.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:
cpu_frequency
oruserspace@cpu_frequency_devlib
- FrequencyAnalysis.plot_cpu_frequency_residency(cpu: CPU, pct: bool = False, domain_label: 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]#
cpu=0, domain_label=False, pct=False
Called on
Trace
instances astrace.ana.frequency.plot_cpu_frequency_residency()
Plot per-CPU frequency residency.
- 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:
cpu_frequency
oruserspace@cpu_frequency_devlib
cpu_idle
- FrequencyAnalysis.plot_cpu_frequency_transitions(cpu: CPU, pct: bool = False, domain_label: 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]#
cpu=0, domain_label=False, pct=False
Called on
Trace
instances astrace.ana.frequency.plot_cpu_frequency_transitions()
Plot frequency transitions count of the specified 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:
cpu_frequency
oruserspace@cpu_frequency_devlib
- FrequencyAnalysis.plot_domain_frequencies(*, 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]#
Called on
Trace
instances astrace.ana.frequency.plot_domain_frequencies()
Plot frequency trend for all frequency domains.
If
sched_overutilized
events are available, the plots will also show the intervals of time where the cluster was overutilized.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:
cpu_frequency
oruserspace@cpu_frequency_devlib
- FrequencyAnalysis.plot_domain_frequency_residency(pct: 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]#
pct=False
Called on
Trace
instances astrace.ana.frequency.plot_domain_frequency_residency()
Plot the frequency residency for all frequency domains.
- Parameters:
pct (bool) – Plot residencies in percentage
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:
cpu_frequency
oruserspace@cpu_frequency_devlib
cpu_idle
- FrequencyAnalysis.plot_domain_frequency_transitions(pct: 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]#
pct=False
Called on
Trace
instances astrace.ana.frequency.plot_domain_frequency_transitions()
Plot frequency transitions count for all frequency domains
- Parameters:
pct (bool) – Plot frequency transitions in percentage
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:
cpu_frequency
oruserspace@cpu_frequency_devlib
- FrequencyAnalysis.plot_peripheral_frequency(clk_name: str, average: bool = True, *, 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]#
average=True, clk_name=aplclk
Called on
Trace
instances astrace.ana.frequency.plot_peripheral_frequency()
Plot frequency for the specified peripheral clock frequency
- 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:
clk_set_rate
clk_enable
clk_disable
- classmethod FrequencyAnalysis.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 FrequencyAnalysis.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 FrequencyAnalysis.df_method(f, index=None)#
Inherited method, see
lisa.analysis.base.TraceAnalysisBase.df_method()
Dataframe function decorator.
- classmethod FrequencyAnalysis.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 FrequencyAnalysis.get_analysis_classes()#
Inherited method, see
lisa.analysis.base.TraceAnalysisBase.get_analysis_classes()
- FrequencyAnalysis.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 FrequencyAnalysis.get_df_methods(*args, **kwargs)#
Inherited method, see
lisa.analysis.base.TraceAnalysisBase.get_df_methods()
- classmethod FrequencyAnalysis.get_logger(suffix=None)#
Inherited method, see
lisa.utils.Loggable.get_logger()
Provides a
logging.Logger
named aftercls
.
- classmethod FrequencyAnalysis.get_plot_methods(*args, **kwargs)#
Inherited method, see
lisa.analysis.base.AnalysisHelpers.get_plot_methods()
- classmethod FrequencyAnalysis.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 FrequencyAnalysis.plot_method(f)#
Inherited method, see
lisa.analysis.base.AnalysisHelpers.plot_method()
Plot function decorator.
- FrequencyAnalysis.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.