Skip to content

Commit 699cf3f

Browse files
authored
remove available mem (#22)
Signed-off-by: kerthcet <kerthcet@gmail.com>
1 parent 6dbd10f commit 699cf3f

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/system/system_info.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ pub struct SystemInfo {
1515
pub architecture: String,
1616
pub cpu_cores: usize,
1717
pub total_memory: String,
18-
pub available_memory: String,
1918
pub cache_dir: String,
2019
pub cache_size: String,
2120
pub models_count: usize,
@@ -25,7 +24,7 @@ pub struct SystemInfo {
2524
impl SystemInfo {
2625
pub fn collect() -> Self {
2726
let mut sys = System::new_all();
28-
sys.refresh_all();
27+
sys.refresh_memory();
2928

3029
let cache_dir = file::cache_dir();
3130
let cache_size = Self::calculate_cache_size(&cache_dir);
@@ -39,7 +38,6 @@ impl SystemInfo {
3938
architecture: System::cpu_arch().unwrap_or_else(|| "Unknown".to_string()),
4039
cpu_cores: sys.cpus().len(),
4140
total_memory: format_size(sys.total_memory()),
42-
available_memory: format_size(sys.available_memory()),
4341
cache_dir: cache_dir.to_string_lossy().to_string(),
4442
cache_size: format_size(cache_size),
4543
models_count,
@@ -95,7 +93,6 @@ impl SystemInfo {
9593
println!(" Architecture: {}", self.architecture);
9694
println!(" CPU Cores: {}", self.cpu_cores);
9795
println!(" Total Memory: {}", self.total_memory);
98-
println!(" Available Memory: {}", self.available_memory);
9996
println!();
10097
println!("PUMA Information:");
10198
println!(" PUMA Version: {}", self.version);

0 commit comments

Comments
 (0)