Skip to main content

embedding_without_trace

Function embedding_without_trace 

Source
pub fn embedding_without_trace(
    reviews: Reviews,
    grants: &[&str],
    limits: Limits,
) -> Embedding
Expand description

The same, with the trace sink left off.

A sink that is going to read an event needs the event to be complete, so HostRegistry describes every argument and every result a call carried whenever one is installed – a deep copy of each, per call. A registry with no sink installed keeps the NullSink it was built with, which answers is_recording() with false, and the description is skipped.

That difference is worth a whole embedding of its own because it is what tracing costs, and cove-rules-measure prints the two rows beside each other. It is not a small number when the value being described is a ten-field struct carrying two arrays.