refactor: add comments
This commit is contained in:
@@ -2,6 +2,7 @@ const std = @import("std");
|
||||
const c_unistd = @cImport(@cInclude("unistd.h"));
|
||||
const c_statvfs = @cImport(@cInclude("sys/statvfs.h"));
|
||||
|
||||
/// Struct representing CPU informations
|
||||
pub const CpuInfo = struct {
|
||||
cpu_name: []u8,
|
||||
cpu_cores: i32,
|
||||
@@ -12,6 +13,7 @@ pub const CpuInfo = struct {
|
||||
}
|
||||
};
|
||||
|
||||
/// Struct representing RAM usage informations
|
||||
pub const RamInfo = struct {
|
||||
ram_size: f64,
|
||||
ram_usage: f64,
|
||||
@@ -22,6 +24,7 @@ pub const RamInfo = struct {
|
||||
}
|
||||
};
|
||||
|
||||
/// Struct representing Swap usage informations
|
||||
pub const SwapInfo = struct {
|
||||
swap_size: f64,
|
||||
swap_usage: f64,
|
||||
@@ -32,6 +35,7 @@ pub const SwapInfo = struct {
|
||||
}
|
||||
};
|
||||
|
||||
/// Struct representing Disk usage informations
|
||||
pub const DiskInfo = struct {
|
||||
disk_path: []const u8,
|
||||
disk_size: f64,
|
||||
|
||||
Reference in New Issue
Block a user