Execution stats for a single output block produced by a task.
| 205 | @DeveloperAPI |
| 206 | @dataclass(frozen=True) |
| 207 | class BlockExecStats: |
| 208 | """Execution stats for a single output block produced by a task.""" |
| 209 | |
| 210 | # Index of the task that produced this block, used to attribute rows |
| 211 | # to individual tasks in per-task statistics. |
| 212 | task_idx: Optional[int] = None |
| 213 | |
| 214 | # Ray node ID of the worker that produced this block. |
| 215 | node_id: str = field( |
| 216 | default_factory=lambda: ray.runtime_context.get_runtime_context().get_node_id() |
| 217 | ) |
| 218 | |
| 219 | # Absolute wall-clock timestamp when block generation started. |
| 220 | start_time_s: Optional[float] = None |
| 221 | # Absolute wall-clock timestamp when block generation finished. |
| 222 | end_time_s: Optional[float] = None |
| 223 | # Total wall-clock duration of the block generation (computed as end_time_s - start_time_s). |
| 224 | wall_time_s: Optional[float] = None |
| 225 | # Time spent inside UDF while generating block. |
| 226 | udf_time_s: Optional[float] = 0 |
| 227 | # Time spent serializing this block into a Ray object. |
| 228 | block_ser_time_s: Optional[float] = None |
| 229 | # Total CPU time consumed by the worker process during the task, across all threads. |
| 230 | cpu_time_s: Optional[float] = None |
| 231 | |
| 232 | @staticmethod |
| 233 | def builder() -> "_BlockExecStatsBuilder": |
| 234 | return _BlockExecStatsBuilder() |
| 235 | |
| 236 | |
| 237 | class _BlockExecStatsBuilder: |
searching dependent graphs…