lisa.analysis.thermal.ThermalAnalysis#
- class lisa.analysis.thermal.ThermalAnalysis(trace, proxy=None)[source]#
Bases:
TraceAnalysisBaseSupport for plotting Thermal Analysis data
- Parameters:
trace (lisa.trace.Trace) – input Trace object
Attributes
Name of the analysis class.
Properties
Get cpufreq cooling devices that appear in the trace.
Get devfreq cooling devices that appear in the trace.
Get thermal zone ids that appear in the trace.
loggerinheritedConvenience short-hand for
self.get_logger().Methods
Get cpufreq cooling device states.
Get devfreq cooling device states.
Get the temperature of the thermal zones.
Plot the state evolution of a cpufreq cooling device.
Plot the state evolution of a devfreq cooling device.
Plot temperature of thermal zones (all by default).
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.Loggernamed 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.Figureas an image file.
Attributes#
- ThermalAnalysis.name = 'thermal'#
Name of the analysis class.
Properties#
- property ThermalAnalysis.cpufreq_cdevs[source]#
Get cpufreq cooling devices that appear in the trace
- Required trace events:
thermal_power_cpu_limit
- property ThermalAnalysis.devfreq_cdevs[source]#
Get devfreq cooling devices that appear in the trace
- Required trace events:
thermal_power_devfreq_limit
- property ThermalAnalysis.thermal_zones[source]#
Get thermal zone ids that appear in the trace
- Required trace events:
thermal_temperature
- property ThermalAnalysis.logger#
Inherited property, see
lisa.utils.Loggable.loggerConvenience short-hand for
self.get_logger().
Methods#
- ThermalAnalysis.df_cpufreq_cooling_state(cpus=None, *, df_fmt=None)[source]#
Called on
Traceinstances astrace.ana.thermal.df_cpufreq_cooling_state()Get cpufreq cooling device states
- Parameters:
- Returns:
a
pandas.DataFramewith:An
cpuscolumn (The CPUs affected by the cooling device)A
freqcolumn (The frequency limit)A
cdev_statecolumn (The cooling device state index)
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:
thermal_power_cpu_limit
- ThermalAnalysis.df_devfreq_cooling_state(devices=None, *, df_fmt=None)[source]#
Called on
Traceinstances astrace.ana.thermal.df_devfreq_cooling_state()Get devfreq cooling device states
- Parameters:
devices – The devfreq devices to consider (all by default)
- Returns:
a
pandas.DataFramewith:An
cpuscolumn (The CPUs affected by the cooling device)A
freqcolumn (The frequency limit)A
cdev_statecolumn (The cooling device state index)
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:
thermal_power_devfreq_limit
- ThermalAnalysis.df_thermal_zones_temperature(*, df_fmt=None)[source]#
Called on
Traceinstances astrace.ana.thermal.df_thermal_zones_temperature()Get the temperature of the thermal zones
- Returns:
a
pandas.DataFramewith:An
idcolumn (The thermal zone ID)A
thermal_zonecolumn (The thermal zone name)A
tempcolumn (The reported temperature)
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:
thermal_temperature
- ThermalAnalysis.plot_cpu_cooling_states(cpu: CPU, *, 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
Traceinstances astrace.ana.thermal.plot_cpu_cooling_states()Plot the state evolution of a cpufreq cooling device
- Parameters:
cpu (int) – The CPU. Whole clusters can be controlled as a single cooling device, they will be plotted as long this CPU belongs to the cluster.
Added by
lisa.analysis.base.AnalysisHelpers.plot_method():- Returns:
The return type is determined by the
outputparameter.- 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. Thebackendparameter 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 nofilepathhas 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 toholoviewsfor now. In the future, this will be eitherholoviewsoruiif used in an interactive jupyter notebook.holoviews: a bare holoviews element.render: a backend-specific object, such asmatplotlib.figure.Figureifbackend='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 * ywill not work ifxis 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.Axesto 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=Trueby default when matplotlib is the current holoviews backend.
- Required trace events:
thermal_power_cpu_limit
- ThermalAnalysis.plot_dev_freq_cooling_states(device: str, *, 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
Traceinstances astrace.ana.thermal.plot_dev_freq_cooling_states()Plot the state evolution of a devfreq cooling device
- Parameters:
device (str) – The devfreq devices to consider
Added by
lisa.analysis.base.AnalysisHelpers.plot_method():- Returns:
The return type is determined by the
outputparameter.- 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. Thebackendparameter 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 nofilepathhas 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 toholoviewsfor now. In the future, this will be eitherholoviewsoruiif used in an interactive jupyter notebook.holoviews: a bare holoviews element.render: a backend-specific object, such asmatplotlib.figure.Figureifbackend='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 * ywill not work ifxis 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.Axesto 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=Trueby default when matplotlib is the current holoviews backend.
- ThermalAnalysis.plot_thermal_zone_temperature(thermal_zone_id: int, *, 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
Traceinstances astrace.ana.thermal.plot_thermal_zone_temperature()Plot temperature of thermal zones (all by default)
- Parameters:
thermal_zone_id (int) – ID of the zone
Added by
lisa.analysis.base.AnalysisHelpers.plot_method():- Returns:
The return type is determined by the
outputparameter.- 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. Thebackendparameter 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 nofilepathhas 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 toholoviewsfor now. In the future, this will be eitherholoviewsoruiif used in an interactive jupyter notebook.holoviews: a bare holoviews element.render: a backend-specific object, such asmatplotlib.figure.Figureifbackend='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 * ywill not work ifxis 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.Axesto 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=Trueby default when matplotlib is the current holoviews backend.
- Required trace events:
thermal_temperature
- classmethod ThermalAnalysis.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 ThermalAnalysis.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 ThermalAnalysis.df_method(f, index=None)#
Inherited method, see
lisa.analysis.base.TraceAnalysisBase.df_method()Dataframe function decorator.
- classmethod ThermalAnalysis.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 ThermalAnalysis.get_analysis_classes()#
Inherited method, see
lisa.analysis.base.TraceAnalysisBase.get_analysis_classes()
- ThermalAnalysis.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 ThermalAnalysis.get_df_methods(*args, **kwargs)#
Inherited method, see
lisa.analysis.base.TraceAnalysisBase.get_df_methods()
- classmethod ThermalAnalysis.get_logger(suffix=None)#
Inherited method, see
lisa.utils.Loggable.get_logger()Provides a
logging.Loggernamed aftercls.
- classmethod ThermalAnalysis.get_plot_methods(*args, **kwargs)#
Inherited method, see
lisa.analysis.base.AnalysisHelpers.get_plot_methods()
- classmethod ThermalAnalysis.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 ThermalAnalysis.plot_method(f)#
Inherited method, see
lisa.analysis.base.AnalysisHelpers.plot_method()Plot function decorator.
- ThermalAnalysis.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.Figureas an image file.