performance improvements and formatting cleanup

This commit is contained in:
2025-08-11 22:37:46 -07:00
parent c3f81eef25
commit d69a4104fc
10 changed files with 141 additions and 75 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ pub struct GpuMetrics {
pub name: String,
pub utilization_gpu_pct: u32, // 0..100
pub mem_used_bytes: u64,
pub mem_total_bytes: u64,
pub mem_total_bytes: u64
}
pub fn collect_all_gpus() -> Result<Vec<GpuMetrics>, Box<dyn std::error::Error>> {
@@ -17,7 +17,7 @@ pub fn collect_all_gpus() -> Result<Vec<GpuMetrics>, Box<dyn std::error::Error>>
name: gpu.model().to_string(),
utilization_gpu_pct: info.load_pct() as u32,
mem_used_bytes: info.used_vram(),
mem_total_bytes: info.total_vram(),
mem_total_bytes: info.total_vram()
};
Ok(vec![metrics])