Skip to main content

render_lines

Function render_lines 

Source
pub fn render_lines() -> String
Expand description

Render the registered units as a multi-line block suitable for appending to the progress display. Returns an empty string when either (a) no units are registered (non-adaptive run) or (b) every registered unit has zero samples — typically a brief startup window before the first probe lands, or a unit class that the current tool never exercises (e.g. mkdir for rcmp, which only stats both sides). With per-syscall controllers we register up to 18 units (Side × MetadataOp); per-tool only a handful actually fire probes and the rest stay hidden via this samples_seen > 0 filter.

The format is one fixed-width line per unit, prefixed by a dashed separator so the panel sits visually apart from the COPIED/REMOVED/ SKIPPED sections above it:

-----------------------
src-stat   cwnd=  42  base=  0.8ms  curr=  2.1ms  ratio=   2.6×  samples=   1.2k
unlink     cwnd=  18  base=  1.2ms  curr=  3.0ms  ratio=   2.5×  samples= 980.0
rmdir      cwnd=   4  base=  2.4ms  curr=  6.1ms  ratio=   2.5×  samples=  80.0

Unit labels are padded to a uniform width so columns align even across labels of varying length (stat, dst-read-link, open-create). Numeric columns are right-aligned to a uniform fixed width.