scope_profiler.plotting_scripts.flame
Flame chart rendering: nested call-stack frames sized by duration.
Attributes
| Name | Description |
|---|---|
FLAME_CMAP | No description. |
plot_flame | No description. |
Functions
| Name | Description |
|---|---|
plot_flame_chart | Plot a flame chart reconstructing the call stack from region timings. |
plot_flame_graph | Plot an aggregated flame graph whose x-axis represents total time. |
FLAME_CMAPattributemodule attribute#
FLAME_CMAP = 'inferno'plot_flameattributemodule attribute#
plot_flame = plot_flame_chartplot_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 | NonePlot 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 | NonePlot an aggregated flame graph whose x-axis represents total time.