feat: Add units to read_rate and read_time meta plugins

Co-authored-by: aider (openai/andrew.openrouter.qwen.qwen3-coder) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-07-29 12:02:41 -03:00
parent ed22df4b98
commit 5a41021188

View File

@@ -80,9 +80,9 @@ impl MetaPlugin for ReadTimeMetaPlugin {
fn finalize(&mut self) -> io::Result<String> {
if let Some(start_time) = self.start_time {
let duration = start_time.elapsed();
Ok(format!("{:.6}", duration.as_secs_f64()))
Ok(format!("{:.6}s", duration.as_secs_f64()))
} else {
Ok("0.000000".to_string())
Ok("0.000000s".to_string())
}
}
@@ -125,12 +125,12 @@ impl MetaPlugin for ReadRateMetaPlugin {
let duration = start_time.elapsed();
if duration.as_secs_f64() > 0.0 {
let rate = self.bytes_read as f64 / duration.as_secs_f64();
Ok(format!("{:.0}", rate))
Ok(format!("{:.0} B/s", rate))
} else {
Ok("0".to_string())
Ok("0 B/s".to_string())
}
} else {
Ok("0".to_string())
Ok("0 B/s".to_string())
}
}