Skip to content
Projects

scope_profiler.plotting_scripts.flame

Flame chart rendering: nested call-stack frames sized by duration.

Attributes

NameDescription
FLAME_CMAPNo description.
plot_flameNo description.

Functions

NameDescription
plot_flame_chartPlot a flame chart reconstructing the call stack from region timings.
plot_flame_graphPlot an aggregated flame graph whose x-axis represents total time.

FLAME_CMAPattributemodule attribute#

FLAME_CMAP = 'inferno'

plot_flameattributemodule attribute#

plot_flame = plot_flame_chart

plot_flame_chartfunction#

def plot_flame_chart(profiling_data: ProfilingResults | Sequence[ProfilingResults], ranks: list[int] | int | None = None, include: list[str] | str | None = None, exclude: list[str] | str | None = None, filepath: str | None = None, show: bool = False, verbose: bool = True, cmap: str = FLAME_CMAP, data_filepath: str | Path | None = None, data_format: str = 'csv', backend: str = 'matplotlib', return_fig: bool = False) -> object | None

Plot a flame chart reconstructing the call stack from region timings.

Parameters

backend : str Backend to use for rendering: “matplotlib” (default) or “plotly”. return_fig : bool Return the rendered figure instead of the default None. Matplotlib returns (fig, axes); Plotly returns its figure object.

plot_flame_graphfunction#

def plot_flame_graph(profiling_data: ProfilingResults | Sequence[ProfilingResults], ranks: list[int] | int | None = None, include: list[str] | str | None = None, exclude: list[str] | str | None = None, filepath: str | None = None, show: bool = False, verbose: bool = True, cmap: str = FLAME_CMAP, data_filepath: str | Path | None = None, data_format: str = 'csv', backend: str = 'matplotlib', return_fig: bool = False) -> object | None

Plot an aggregated flame graph whose x-axis represents total time.