From 4906472bdb54780516127f6d9632ca5ecea82e10 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 31 Jul 2024 14:17:18 +0200 Subject: [PATCH 1/3] Update migration guide for 0.31 --- migration_guide.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/migration_guide.md b/migration_guide.md index 40e755224..b3c01cddf 100644 --- a/migration_guide.md +++ b/migration_guide.md @@ -31,6 +31,25 @@ let mut s = System::new(); s.refresh_processes(ProcessesToUpdate::All); ``` +#### Global CPU usage + +`System::global_cpu_usage` now returns an `f32` representing the global CPU usage and no +other information. + +#### Features + +You can now enable/disable parts of `sysinfo` API through its cargo features to have +smaller build (size and time). If you're only interested by network information, then +you'll import `sysinfo` like this: + +```toml +sysinfo = { version = "0.31", default-features = false, features = ["network"] } +``` + +#### Renaming + +The `TermalSensorType` type was renamed into `ThermalSensorType`. + ## 0.29 to 0.30 With this update, the minimum supported Rust version goes up to 1.69. From 8e4ea502d4f579d5427712c839f987ed3a9e9e8d Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 31 Jul 2024 14:17:26 +0200 Subject: [PATCH 2/3] Update CHANGELOG for 0.31 --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 023b60455..b58f1e8b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +# 0.31.0 + + * Split crate in features to only enable what you need. + * Remove `System::refresh_process`, `System::refresh_process_specifics` and `System::refresh_pids` +methods. + * Add new argument of type `ProcessesToUpdate` to `System::refresh_processes` and `System::refresh_processes_specifics` methods. + * Add new `NetworkData::ip_networks` method. + * Add new `System::refresh_cpu_list` method. + * Global CPU now only contains CPU usage. + * Rename `TermalSensorType` to `ThermalSensorType`. + * Process names is now an `OsString`. + * macOS: Fix invalid CPU computation when single processes are refreshed one after the other. + * Windows: Fix virtual memory computation. + * Windows: Fix WoW64 parent process refresh. + * Linux: Retrieve RSS (Resident Set Size) memory for cgroups. + # 0.30.13 * macOS: Fix segfault when calling `Components::refresh_list` multiple times. From b5c6d95323a058be0722fb51c4322efba62ca8b2 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 31 Jul 2024 14:17:49 +0200 Subject: [PATCH 3/3] Update crate version to 0.31.0 --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 98dcc8c62..1fa1dfd2c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.30.13" +version = "0.31.0" dependencies = [ "bstr", "core-foundation-sys", diff --git a/Cargo.toml b/Cargo.toml index b34de0996..c5fc04466 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.30.13" +version = "0.31.0" authors = ["Guillaume Gomez "] description = "Library to get system information such as processes, CPUs, disks, components and networks" repository = "https://github.com/GuillaumeGomez/sysinfo"