List Length
1 version
Length
Returns the number of elements in a list.
Use this when
- You need to monitor or log how large an upstream batch is.
- You want to trigger a threshold check based on list size.
- You need to generate metadata (e.g. count, batch size) alongside the data.
What it does
Consumes one list per tick and emits a UInt64 equal to its element count. Input [0, 1, 2, 3, 4] becomes 5.
Inputs
| Type | Description |
|---|---|
[t] | A list of any type. |
Outputs
| Type | Description |
|---|---|
UInt64 | Number of list elements. |
Parameters
This transformation takes no parameters.
Works best with
- Detection components that emit variable-length result lists per frame.
- Downstream thresholding, logging, or alerting components.
Caveats
- Output is always
UInt64— negative or signed counts are not possible. - The list itself is consumed. Pair with a stream split upstream if you also need the elements.
Versions
- 342bebecdefaultlatestlinuxTransformation