fig_runtime_breakdown

passengersim.contrast.fig_runtime_breakdown(summaries: Contrast, *, raw_df: bool = False, also_df: bool = False, title: str | None = 'Runtime Breakdown') → Chart | DataFrame | tuple[Chart, DataFrame][source]

Compare runtime components using one stacked bar per simulation run.

Parameters:
summaries : Contrast

Named simulation results to compare. Results without runtime data are skipped with a warning.

raw_df : bool, default False

Return the dataframe instead of the figure. Takes precedence over also_df.

also_df : bool, default False

Return both the figure and its dataframe.

title : str, optional

Chart title. Pass None for no title.

Returns:

alt.Chart or pd.DataFrame or tuple[alt.Chart, pd.DataFrame] – Stacked runtime chart, data with source, Category, Time (seconds), and Percent columns, or both. Percentages are fractions of each run’s total runtime.

Raises:

Exception – If no runtime data can be recovered from any result.