Sink & Counter¶
Built-in result collectors for tracking events and latency.
Common reusable entities for simulations.
Provides ready-made Sink and Counter entities that eliminate the need to write boilerplate event-collecting classes in every example or test.
Sink ¶
Bases: Entity
Event collector with latency tracking.
Computes per-event latency from context["created_at"]. When that
key is missing the latency is recorded as 0.
Attributes:
| Name | Type | Description |
|---|---|---|
events_received |
int
|
Total number of events handled. |
latencies_s |
list[float]
|
Per-event latency in seconds (same order as arrival). |
completion_times |
list[Instant]
|
Simulation |