Skip to main content

Module metrics

Module metrics 

Source
Expand description

Pure session metrics rendering; host observation and painting remain outside.

Structs§

MetricCell
One rendered cell: a value with its localized short label.
MetricGroupCells
A group of one or two cells separated by ·.
MetricLabels
RenderedStrip
A rendered strip: the plain text (for tests, /status, and width math) plus the cells that survived the budget, so the painter can style labels and values differently.
Separators
Separators used between cells and between groups.

Enums§

MetricGroup
Group priority, highest kept first. When the row is too narrow, groups are dropped from the end of this list; inside a group the second cell (steps, tools, tok/s) is dropped before the group itself.

Functions§

build_groups
Build the cells for every group that has something truthful to show.
format_duration
Format a duration the way the strip does: 11m46s, 1h02m, 1.5s, 320ms.
format_rate
Format an output rate: 120 or 7.5 (the label carries tok/s).
format_tokens
Format a token count: 842, 12.3K, 9.3M, 1.2B.