spdl.pipeline.StatsQueue¶
- class StatsQueue(name: str, buffer_size: int = 0, interval: float = -1)[source]¶
Measures the time stages are blocked on upstream/downstream stage. Extends
AsyncQueue
.- Parameters:
name – The name of the queue. Assigned by
PipelineBuilder
.buffer_size – The buffer size. Assigned by
PipelineBuilder
.
Methods
empty
()Return True if the queue is empty, False otherwise.
full
()Return True if there are maxsize items in the queue.
get
()Remove and return an item from the queue, track the time.
get_nowait
()Remove and return an item from the queue.
join
()Block until all items in the queue have been gotten and processed.
put
(item)Remove and return an item from the queue, track the time.
put_nowait
(item)Put an item into the queue without blocking.
qsize
()Number of items in the queue.
Context manager, which handles init/final logic for the stage.
task_done
()Indicate that a formerly enqueued task is complete.
Attributes
maxsize
Number of items allowed in the queue.
- stage_hook() AsyncIterator[None] [source]¶
Context manager, which handles init/final logic for the stage.