added graceful fallback if nvml doesnt hit

This commit is contained in:
2025-08-09 18:48:48 +02:00
parent f570f3c67d
commit 41b56d165e
2 changed files with 2 additions and 6 deletions

View File

@@ -61,12 +61,7 @@ pub fn get_gpu_metrics() -> Result<(f64, f64, f64, f64), Box<dyn Error>> {
return Err(anyhow::anyhow!("Failed to initialize NVML").into());
};
Ok((
gpu_temp as f64,
gpu_load as f64,
vram_used as f64,
vram_total as f64,
))
Ok((gpu_temp, gpu_load, vram_used, vram_total))
}
fn detect_gpu_name() -> String {

View File

@@ -12,6 +12,7 @@ pub use disk::get_disk_info;
pub use gpu::get_gpu_info;
pub use memory::get_memory_info;
pub use network::get_network_info;
pub use network::NetworkMonitor;
#[derive(Debug)]
pub struct HardwareInfo {