feat: bump version of sysinfo and upgrade code for it

This commit is contained in:
Louis-Marie Baer 2024-02-26 19:43:32 +01:00
parent 2e51b312a4
commit 7b60a88176
4 changed files with 15 additions and 10 deletions

16
Cargo.lock generated
View file

@ -4609,16 +4609,16 @@ dependencies = [
[[package]]
name = "sysinfo"
version = "0.29.11"
version = "0.30.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd727fc423c2060f6c92d9534cef765c65a6ed3f428a03d7def74a8c4348e666"
checksum = "1fb4f3438c8f6389c864e61221cbc97e9bca98b4daf39a5beb7bea660f528bb2"
dependencies = [
"cfg-if",
"core-foundation-sys",
"libc",
"ntapi",
"once_cell",
"winapi",
"windows",
]
[[package]]
@ -6174,6 +6174,16 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be"
dependencies = [
"windows-core",
"windows-targets 0.52.0",
]
[[package]]
name = "windows-core"
version = "0.52.0"

View file

@ -66,7 +66,7 @@ regex = { version = "1.10.3", default-features = false, features = ["perf"] }
rfd = "0.14.0"
serde = { version = "1.0.197", features = ["rc", "derive"] }
serde_json = "1.0"
sysinfo = { version = "0.29.11", default-features = false }
sysinfo = { version = "0.30.5", default-features = false }
tls-api = "0.9.0"
tokio = { version = "1.36.0", features = ["rt", "time", "macros", "process"] }
toml = { version = "0.8.10", features = ["preserve_order"] }

View file

@ -46,8 +46,6 @@ use std::{
thread,
time::*,
};
use sysinfo::SystemExt;
use sysinfo::{CpuExt, ProcessExt};
//---------------------------------------------------------------------------------------------------- Constants
// The max amount of bytes of process output we are willing to

View file

@ -50,9 +50,6 @@ use std::{
sync::{Arc, Mutex},
time::Instant,
};
// Sysinfo
use sysinfo::CpuExt;
use sysinfo::SystemExt;
// Modules
//mod benchmark;
mod constants;
@ -219,7 +216,7 @@ impl App {
sysinfo::RefreshKind::new()
.with_cpu(sysinfo::CpuRefreshKind::everything())
.with_processes(sysinfo::ProcessRefreshKind::new().with_cpu())
.with_memory(),
.with_memory(sysinfo::MemoryRefreshKind::everything()),
);
sysinfo.refresh_all();
let pid = match sysinfo::get_current_pid() {