Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sysinfo version to 0.30.0 #11071

Merged
merged 1 commit into from
Dec 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/bevy_diagnostic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ bevy_utils = { path = "../bevy_utils", version = "0.12.0" }
# MacOS
[target.'cfg(all(target_os="macos"))'.dependencies]
# Some features of sysinfo are not supported by apple. This will disable those features on apple devices
sysinfo = { version = "0.29.0", default-features = false, features = [
sysinfo = { version = "0.30.0", default-features = false, features = [
"apple-app-store",
] }

# Only include when not bevy_dynamic_plugin and on linux/windows/android
[target.'cfg(any(target_os = "linux", target_os = "windows", target_os = "android"))'.dependencies]
sysinfo = { version = "0.29.0", default-features = false }
sysinfo = { version = "0.30.0", default-features = false }

[lints]
workspace = true
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl SystemInformationDiagnosticsPlugin {
pub mod internal {
use bevy_ecs::{prelude::ResMut, system::Local};
use bevy_log::info;
use sysinfo::{CpuExt, CpuRefreshKind, RefreshKind, System, SystemExt};
use sysinfo::{CpuRefreshKind, MemoryRefreshKind, RefreshKind, System};

use crate::{Diagnostic, Diagnostics, DiagnosticsStore};

Expand Down Expand Up @@ -76,7 +76,7 @@ pub mod internal {
*sysinfo = Some(System::new_with_specifics(
RefreshKind::new()
.with_cpu(CpuRefreshKind::new().with_cpu_usage())
.with_memory(),
.with_memory(MemoryRefreshKind::everything()),
));
}
let Some(sys) = sysinfo.as_mut() else {
Expand Down Expand Up @@ -116,12 +116,8 @@ pub mod internal {
sys.refresh_memory();

let info = SystemInfo {
os: sys
.long_os_version()
.unwrap_or_else(|| String::from("not available")),
kernel: sys
.kernel_version()
.unwrap_or_else(|| String::from("not available")),
os: System::long_os_version().unwrap_or_else(|| String::from("not available")),
kernel: System::kernel_version().unwrap_or_else(|| String::from("not available")),
cpu: sys.global_cpu_info().brand().trim().to_string(),
core_count: sys
.physical_core_count()
Expand Down
Loading