Skip to main content

walk_spans

Function walk_spans 

Source
fn walk_spans(
    root: &Path,
    f: &mut Frame,
    op: Expand,
    open: &[Arc<Open>],
    st: &mut Stats,
) -> Result<()>
Expand description

The one pass both span-side expanders need: every span of the frame’s traces, with its start, its duration and its resource.

One function for two operations because they differ in three lines and share the expensive part — opening trace blocks and matching 16-byte ids. A [Traces, Peers] walk still reads them twice; that is one extra pass per call, not per row, and splitting the shared shape to save it would cost more than it returns.