MCPcopy Create free account
hub / github.com/MultiFuzz/MultiFuzz / get_non_empty_streams

Function get_non_empty_streams

hail-fuzz/src/utils.rs:163–169  ·  view source on GitHub ↗

Retrivies the address and size of all streams in `data` with an non-zero length.

(data: &MultiStream)

Source from the content-addressed store, hash-verified

161
162/// Retrivies the address and size of all streams in `data` with an non-zero length.
163pub(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

Callers 2

startMethod · 0.85
initMethod · 0.85

Calls 2

is_emptyMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected