Stream output (cmd/client/output.rs), the run summary (cmd/client/summary.rs), and the TUI (cmd/tui/ui.rs) each carried a private copy of the same scalar vocabulary, and the copies had drifted:
the TUI spelled microseconds us, the other two µs;
percentages guarded non-finite values in the TUI but not in the summary (a NaN% was reachable);
the absent-value placeholder "-" was spelled inline at a dozen sites;
one copy pre-rounded to whole nanoseconds, another did not.
New CLI-internal cmd::format module owns nanosecond scalars, percentages, ratios, counts, and the absent placeholder, with one documented unit-selection and rounding policy: ns whole below 1µs, µs/ms to one decimal, s to three, sign preserved by formatting the magnitude, non-finite rendered as -.
The frontends keep their own metric sets and layouts. The TUI's coarse wall-clock display is still its own policy — renamed format_span, documented as deliberately coarser (0s, one-decimal seconds, 1m30s) — but it now delegates everything below one second to the shared vocabulary instead of repeating it.
Behavior
Microseconds are now µs everywhere, including the TUI's stat rows and graph axis labels. This is the intended fix for the known discrepancy.
The summary no longer renders NaN% for a non-finite percentage, and non-finite nanosecond scalars render as - rather than NaN…; both were unreachable in normal runs and are now defined.
No other user-visible value, row, column, or layout changed. Verified by the existing output/summary/TUI tests, which pass unchanged apart from the us → µs spelling.
Scope
Explicitly not changed:
Which metrics each frontend displays, and in what layout — no rows or columns added, removed, or reordered.
The TUI graph-axis label policy (variable precision to fit a narrow axis) and the coarse span policy, both of which remain deliberately distinct from the scalar policy.
irtt-stats — no presentation formatting was moved into it.
No generic formatting framework, traits, or builders were introduced; the module holds exactly the vocabulary more than one frontend needs.
cargo check -p irtt-cli --no-default-features --features server --all-targets --locked
git diff --check
## Summary
- Stream output (`cmd/client/output.rs`), the run summary (`cmd/client/summary.rs`), and the TUI (`cmd/tui/ui.rs`) each carried a private copy of the same scalar vocabulary, and the copies had drifted:
- the TUI spelled microseconds `us`, the other two `µs`;
- percentages guarded non-finite values in the TUI but not in the summary (a `NaN%` was reachable);
- the absent-value placeholder `"-"` was spelled inline at a dozen sites;
- one copy pre-rounded to whole nanoseconds, another did not.
- New CLI-internal `cmd::format` module owns nanosecond scalars, percentages, ratios, counts, and the absent placeholder, with one documented unit-selection and rounding policy: `ns` whole below 1µs, `µs`/`ms` to one decimal, `s` to three, sign preserved by formatting the magnitude, non-finite rendered as `-`.
- The frontends keep their own metric sets and layouts. The TUI's coarse wall-clock display is still its own policy — renamed `format_span`, documented as deliberately coarser (`0s`, one-decimal seconds, `1m30s`) — but it now delegates everything below one second to the shared vocabulary instead of repeating it.
## Behavior
- Microseconds are now `µs` everywhere, including the TUI's stat rows and graph axis labels. This is the intended fix for the known discrepancy.
- The summary no longer renders `NaN%` for a non-finite percentage, and non-finite nanosecond scalars render as `-` rather than `NaN…`; both were unreachable in normal runs and are now defined.
- No other user-visible value, row, column, or layout changed. Verified by the existing output/summary/TUI tests, which pass unchanged apart from the `us` → `µs` spelling.
## Scope
Explicitly not changed:
- Which metrics each frontend displays, and in what layout — no rows or columns added, removed, or reordered.
- The TUI graph-axis label policy (variable precision to fit a narrow axis) and the coarse span policy, both of which remain deliberately distinct from the scalar policy.
- `irtt-stats` — no presentation formatting was moved into it.
- No generic formatting framework, traits, or builders were introduced; the module holds exactly the vocabulary more than one frontend needs.
## Verification
Run from the task worktree, all successful:
- `cargo fmt --all -- --check`
- `cargo check --workspace --all-targets --all-features --locked`
- `cargo test --workspace --all-targets --all-features --locked`
- `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings`
- `RUSTDOCFLAGS="-D warnings" cargo doc --workspace --all-features --no-deps --locked`
- `cargo check -p irtt-cli --no-default-features --features client --all-targets --locked`
- `cargo check -p irtt-cli --no-default-features --features tui --all-targets --locked`
- `cargo check -p irtt-cli --no-default-features --features server --all-targets --locked`
- `git diff --check`
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
cmd/client/output.rs), the run summary (cmd/client/summary.rs), and the TUI (cmd/tui/ui.rs) each carried a private copy of the same scalar vocabulary, and the copies had drifted:us, the other twoµs;NaN%was reachable);"-"was spelled inline at a dozen sites;cmd::formatmodule owns nanosecond scalars, percentages, ratios, counts, and the absent placeholder, with one documented unit-selection and rounding policy:nswhole below 1µs,µs/msto one decimal,sto three, sign preserved by formatting the magnitude, non-finite rendered as-.format_span, documented as deliberately coarser (0s, one-decimal seconds,1m30s) — but it now delegates everything below one second to the shared vocabulary instead of repeating it.Behavior
µseverywhere, including the TUI's stat rows and graph axis labels. This is the intended fix for the known discrepancy.NaN%for a non-finite percentage, and non-finite nanosecond scalars render as-rather thanNaN…; both were unreachable in normal runs and are now defined.us→µsspelling.Scope
Explicitly not changed:
irtt-stats— no presentation formatting was moved into it.Verification
Run from the task worktree, all successful:
cargo fmt --all -- --checkcargo check --workspace --all-targets --all-features --lockedcargo test --workspace --all-targets --all-features --lockedcargo clippy --workspace --all-targets --all-features --locked -- -D warningsRUSTDOCFLAGS="-D warnings" cargo doc --workspace --all-features --no-deps --lockedcargo check -p irtt-cli --no-default-features --features client --all-targets --lockedcargo check -p irtt-cli --no-default-features --features tui --all-targets --lockedcargo check -p irtt-cli --no-default-features --features server --all-targets --lockedgit diff --check