Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions crates/rocm-dash-tui/src/ui/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ pub fn tps_opt(value: Option<f64>) -> String {
}
}

/// Latency in milliseconds (TTFT/TPOT). `123ms`. `—` when None or non-finite.
pub fn ms_opt(value: Option<f64>) -> String {
value
.filter(|v| v.is_finite())
.map_or_else(|| "—".to_string(), |v| format!("{v:.0}ms"))
}

/// Energy efficiency: generation throughput per watt. `0.42 tok/W`. `-` when
/// None or non-finite (no throughput sample or no GPU power telemetry).
pub fn tokens_per_watt(value: Option<f64>) -> String {
Expand Down
Loading
Loading