Retrivies the address and size of all streams in `data` with an non-zero length.
(data: &MultiStream)
| 161 | |
| 162 | /// Retrivies the address and size of all streams in `data` with an non-zero length. |
| 163 | pub(crate) fn get_non_empty_streams(data: &MultiStream) -> Vec<(StreamKey, usize)> { |
| 164 | data.streams |
| 165 | .iter() |
| 166 | .filter(|(_, data)| !data.bytes.is_empty()) |
| 167 | .map(|(key, data)| (*key, data.bytes.len())) |
| 168 | .collect() |
| 169 | } |
| 170 | |
| 171 | /// Assign weights that control often each stream is mutated based on on the colorization rate. |
| 172 | /// This avoids spending effort on mutating streams that have little to zero impact on the path of |