tasks.utils#

Module Contents#

Classes#

TaskPerfUtils

Utilities for aggregating stage performance metrics from tasks.

API#

class tasks.utils.TaskPerfUtils#

Utilities for aggregating stage performance metrics from tasks.

Example output format: { “StageA”: {“process_time”: np.array([…]), “actor_idle_time”: np.array([…]), “read_time_s”: np.array([…]), …}, “StageB”: {“process_time”: np.array([…]), …} }

static collect_stage_metrics(
tasks: list[tasks.tasks.Task],
) dict[str, dict[str, numpy.ndarray[float]]]#

Collect per-stage metric lists from a list of tasks.

The returned mapping aggregates both built-in StagePerfStats metrics and any custom_stats recorded by stages.

Args: tasks: Iterable of tasks, each having a _stage_perf: list[StagePerfStats] attribute.

Returns: Dict mapping stage_name -> metric_name -> list of numeric values.