Skip to main content

pair_bytes

Function pair_bytes 

Source
fn pair_bytes(
    many: &SeriesLabels,
    one: &SeriesLabels,
    matching: &BinaryMatching,
    include: &[Arc<str>],
) -> usize
Expand description

The bytes one pairing allocates before it files a row: the result label set result_metric rewrites, the group_* labels it copies in, the reference vector it collects the matching label names into, and the key its rows are looked up by.

Each rewrite filters the tag list into a Vec and turns that into a shared slice, so the list it replaces is alive while two copies of the new one are built, and an included label the many side does not carry is inserted, which costs its descriptor too. The matching names are collected into a reference vector of their own before the rewrite, for on(...) and ignoring(...) alike and whether or not the series carries them. This is one pairing’s scratch: the next pairing replaces it, and a pairing whose axes share no position still pays it, because the label set is built before the axes are intersected.