sgnligo.transforms.latency
¶
An element to calculate latency of buffers.
Latency
dataclass
¶
Bases: TransformElement
Calculate latency and prepare data into the format expected by the KafkaSink
Parameters:
Name | Type | Description | Default |
---|---|---|---|
route
|
Optional[str]
|
str, the kafka route to send the latency data to |
None
|
interval
|
Optional[float]
|
float, the interval to calculate latency, in seconds |
None
|
Source code in sgnligo/transforms/latency.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
|
new(pad)
¶
Calculate buffer latency. Latency is defined as the current time subtracted by the buffer start time.
Source code in sgnligo/transforms/latency.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
|