Skip to content

Commit

Permalink
chore(deps): Bump sysinfo from 0.29.10 to 0.30.0 (#14138)
Browse files Browse the repository at this point in the history
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Richard Chien <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Richard Chien <[email protected]>
  • Loading branch information
dependabot[bot] and stdrc authored Dec 26, 2023
1 parent d25c5da commit b1e261a
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 17 deletions.
29 changes: 24 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ speedate = "0.13.0"
static_assertions = "1"
strum = "0.25"
strum_macros = "0.25"
sysinfo = { version = "0.29", default-features = false }
sysinfo = { version = "0.30", default-features = false }
thiserror = "1"
thiserror-ext = { workspace = true }
tinyvec = { version = "1", features = ["rustc_1_55", "grab_spare_slice"] }
Expand Down
15 changes: 5 additions & 10 deletions src/common/src/telemetry/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub mod report;
use std::time::SystemTime;

use serde::{Deserialize, Serialize};
use sysinfo::{System, SystemExt};
use sysinfo::System;
use thiserror_ext::AsReport;

use crate::util::env_var::env_var_is_true_or;
Expand Down Expand Up @@ -95,21 +95,16 @@ struct Cpu {

impl SystemData {
pub fn new() -> Self {
let mut sys = System::new();

let memory = {
let total = system_memory_available_bytes();
let used = total_memory_used_bytes();
Memory { used, total }
};

let os = {
sys.refresh_system();
Os {
name: sys.name().unwrap_or_default(),
kernel_version: sys.kernel_version().unwrap_or_default(),
version: sys.os_version().unwrap_or_default(),
}
let os = Os {
name: System::name().unwrap_or_default(),
kernel_version: System::kernel_version().unwrap_or_default(),
version: System::os_version().unwrap_or_default(),
};

let cpu = Cpu {
Expand Down
2 changes: 1 addition & 1 deletion src/common/src/util/resource_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ mod runtime {
}

pub mod memory {
use sysinfo::{System, SystemExt};
use sysinfo::System;

use super::runtime::get_resource;

Expand Down

0 comments on commit b1e261a

Please sign in to comment.