MCPcopy Create free account
hub / github.com/ray-project/ray / BlockExecStats

Class BlockExecStats

python/ray/data/block.py:207–234  ·  view source on GitHub ↗

Execution stats for a single output block produced by a task.

Source from the content-addressed store, hash-verified

205@DeveloperAPI
206@dataclass(frozen=True)
207class 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
237class _BlockExecStatsBuilder:

Callers 6

create_output_bundleFunction · 0.90
create_bundle_with_sizeFunction · 0.90
create_bundle_with_rowsFunction · 0.90
op_two_blockFunction · 0.90
create_block_statsFunction · 0.90
buildMethod · 0.85

Calls 2

get_runtime_contextMethod · 0.80
get_node_idMethod · 0.45

Tested by 5

create_output_bundleFunction · 0.72
create_bundle_with_sizeFunction · 0.72
create_bundle_with_rowsFunction · 0.72
op_two_blockFunction · 0.72
create_block_statsFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…