feat: add ram usage percentage

This commit is contained in:
utox39
2025-03-04 01:47:45 +01:00
parent 156bf14369
commit 873644a2ec

View File

@@ -39,6 +39,6 @@ pub fn main() !void {
allocator.free(gpu_info.gpu_name); allocator.free(gpu_info.gpu_name);
const ram_info = try os_module.getRamInfo(); const ram_info = try os_module.getRamInfo();
try stdout.print("ram: {d:.2} / {d:.2} GB\n", .{ ram_info.ram_usage, ram_info.ram_size }); try stdout.print("ram: {d:.2} / {d:.2} GB ({}%)\n", .{ ram_info.ram_usage, ram_info.ram_size, ram_info.ram_usage_percentage });
try bw.flush(); try bw.flush();
} }