commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
7f3a8237fef8af01a4cb2d1f7b0bfd0beb83d29a
Guillaume Gomez
2022-05-10T09:56:34
Fix signals check
diff --git a/tests/code_checkers/signals.rs b/tests/code_checkers/signals.rs index 40130bb..68e47f7 100644 --- a/tests/code_checkers/signals.rs +++ b/tests/code_checkers/signals.rs @@ -31,10 +31,7 @@ fn check_kill_decl<'a>(lines: &mut impl Iterator<Item = &'a str>, p: &Path) -> u } else if trimmed.starts_with(...
1
1
4
1b20f33c565686a51238668fb6b74025eb48362c
Guillaume Gomez
2022-05-09T19:16:13
Fix clippy lint
diff --git a/src/windows/process.rs b/src/windows/process.rs index b82a829..3cf1386 100644 --- a/src/windows/process.rs +++ b/src/windows/process.rs @@ -339,7 +339,7 @@ impl Process { impl ProcessExt for Process { fn kill_with(&self, signal: Signal) -> Option<bool> { - let _c_signal = super::system::conv...
1
1
1
9b54b4dba6f3280bdd116fe154a61471098b9eb1
Guillaume Gomez
2022-05-09T17:21:27
Parallelize `refresh_processors` to prevent slowness from `get_cpu_frequency`
diff --git a/src/linux/system.rs b/src/linux/system.rs index e0aa180..5919bb9 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -285,7 +285,7 @@ impl System { parts.next().map(to_u64).unwrap_or(0), parts.next().map(to_u64).unwrap_or(0), ...
2
29
7
d73f715f6d1b8a79cf35a115cf0df8600cd58e9e
Guillaume Gomez
2022-04-28T20:14:29
Update crate version to 0.23.11
diff --git a/Cargo.toml b/Cargo.toml index fad0e4a..efa6e68 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.23.10" +version = "0.23.11" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, p...
1
1
1
6d205b6d9e5b4186b5f4438c9746a970c1d618bd
Guillaume Gomez
2022-04-13T11:19:55
Update crate version to 0.23.10
diff --git a/Cargo.toml b/Cargo.toml index 078ac3a..fad0e4a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.23.9" +version = "0.23.10" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pr...
1
1
1
d9545356099dd3d88bfecfe7e345c697e0b3732e
Guillaume Gomez
2022-04-13T08:58:57
Improve `refresh_cpu` documentation
diff --git a/src/traits.rs b/src/traits.rs index 02be958..fd214fd 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -597,6 +597,10 @@ pub trait SystemExt: Sized + Debug + Default + Send + Sync { /// Refreshes CPU usage. /// + /// ⚠️ Please note that the result will very likely be inaccurate at the first ...
1
4
0
3fec6e958f839fad02d012d8d4a0c47274d90f5d
Guillaume Gomez
2022-04-08T19:05:35
Update crate version to 0.23.9
diff --git a/Cargo.toml b/Cargo.toml index 1eab8eb..078ac3a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.23.8" +version = "0.23.9" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
ce2b5a2201b7ee7b6edbd457439eb97d1daf8bdb
William Dussault
2022-04-08T01:52:47
Still CFStringGetCStringPtr whenever possible
diff --git a/src/apple/macos/disk.rs b/src/apple/macos/disk.rs index 1238645..6ac7bcd 100644 --- a/src/apple/macos/disk.rs +++ b/src/apple/macos/disk.rs @@ -118,18 +118,24 @@ unsafe fn get_str_value(dict: CFDictionaryRef, key: &[u8]) -> Option<String> { let len_utf16 = cfs::CFStringGetLength(v); let l...
1
16
10
ac6f7aafe61ef37922867c7319c020dcd703b6b8
William Dussault
2022-04-08T01:26:02
Fix missing disks on MacOS
diff --git a/src/apple/macos/disk.rs b/src/apple/macos/disk.rs index fed8e60..1238645 100644 --- a/src/apple/macos/disk.rs +++ b/src/apple/macos/disk.rs @@ -114,11 +114,23 @@ unsafe fn get_dict_value<T, F: FnOnce(*const c_void) -> Option<T>>( unsafe fn get_str_value(dict: CFDictionaryRef, key: &[u8]) -> Option<String>...
2
27
6
45f0f17aded20f265959fd82d48d3a4f1f40b750
Guillaume Gomez
2022-04-06T09:41:55
Update crate version to 0.23.8
diff --git a/Cargo.toml b/Cargo.toml index 75a8260..1eab8eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.23.7" +version = "0.23.8" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
c1b0c27ab50998c39cc3ba7846bea9f097680b88
Jacob Kiesel
2022-04-06T09:30:18
Fix underflow for windows run_time computation (#717) Use saturating_sub instead of checked_sub to compute Windows run_time
diff --git a/src/windows/process.rs b/src/windows/process.rs index 142cdb1..b82a829 100644 --- a/src/windows/process.rs +++ b/src/windows/process.rs @@ -332,7 +332,7 @@ impl Process { if refresh_kind.disk_usage() { update_disk_usage(self); } - self.run_time = now - self.start_time(...
1
1
1
12c6a135b3457c309164b9b473c5d055de44b7d2
Guillaume Gomez
2022-04-05T15:33:32
Update crate version to 0.23.7
diff --git a/Cargo.toml b/Cargo.toml index a60aebf..75a8260 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.23.6" +version = "0.23.7" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
7967d5cd6e7a6a8dbe96cbc5ff260b0864d69562
ComplexSpaces
2022-04-05T01:56:44
Ignore non-root drive partitions
diff --git a/src/apple/macos/disk.rs b/src/apple/macos/disk.rs index c1411a4..fed8e60 100644 --- a/src/apple/macos/disk.rs +++ b/src/apple/macos/disk.rs @@ -139,6 +139,21 @@ fn new_disk( unsafe { let mut stat: statfs = mem::zeroed(); if statfs(mount_point_cpath.as_ptr() as *const i8, &mut stat) =...
1
15
0
83d368afb69647c65370596202db239e988acf1f
Guillaume Gomez
2022-03-29T16:15:11
Update crate version to 0.23.6
diff --git a/Cargo.toml b/Cargo.toml index 3709c16..a60aebf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.23.5" +version = "0.23.6" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
e061ddbd7dad789a9aa28ec126eeb3605e55654f
Guillaume Gomez
2022-03-29T15:31:45
Unify Process::new_with_handle with Process::new_from_pid
diff --git a/src/windows/process.rs b/src/windows/process.rs index 40087bc..142cdb1 100644 --- a/src/windows/process.rs +++ b/src/windows/process.rs @@ -192,16 +192,53 @@ impl Process { return None; } let info = info.assume_init(); - Some(Process::new_with_handle( +...
1
46
61
23d5462529e4e730e9a6e95fb3916956a2c7f76f
Guillaume Gomez
2022-03-29T15:28:36
Fix invalid name retrieval on Windows
diff --git a/src/windows/process.rs b/src/windows/process.rs index 865a9df..40087bc 100644 --- a/src/windows/process.rs +++ b/src/windows/process.rs @@ -178,10 +178,7 @@ unsafe fn get_exe(process_handler: HANDLE, h_mod: *mut c_void) -> PathBuf { impl Process { pub(crate) fn new_from_pid(pid: Pid, now: u64) -> Opt...
3
14
8
122f702445b8af9b2ba24d1539adf0901e116b7e
Guillaume Gomez
2022-03-05T15:54:01
Greatly simplify code for FreeBSD process update
diff --git a/src/freebsd/system.rs b/src/freebsd/system.rs index 27ada66..15b4866 100644 --- a/src/freebsd/system.rs +++ b/src/freebsd/system.rs @@ -164,7 +164,8 @@ impl SystemExt for System { let fscale = self.system_info.fscale; let page_size = self.system_info.page_size as isize; ...
2
17
111
1fcdd6d999b3ac423436a3cf599e27618f5a0466
Guillaume Gomez
2022-02-28T19:15:26
Update crate version for 0.23.5
diff --git a/Cargo.toml b/Cargo.toml index fbe72ce..3709c16 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.23.4" +version = "0.23.5" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
990f2e09bd4764140375999e287ba3d3c7b7ad9c
Guillaume Gomez
2022-02-27T20:52:50
Clean up windows disk code
diff --git a/src/windows/disk.rs b/src/windows/disk.rs index 3e8fdbe..ae393af 100644 --- a/src/windows/disk.rs +++ b/src/windows/disk.rs @@ -3,35 +3,22 @@ use crate::{DiskExt, DiskType}; use std::ffi::{OsStr, OsString}; +use std::mem::size_of; use std::path::Path; -use winapi::um::fileapi::GetDiskFreeSpaceExW; -...
3
183
203
af8c02b7f4d129e59d83dbeb3b1728db0f778671
Andrew Chin
2022-02-26T22:26:48
Replace DeviceIoControl with GetDiskFreeSpaceExW
diff --git a/src/windows/tools.rs b/src/windows/tools.rs index f3acaec..3c21afe 100644 --- a/src/windows/tools.rs +++ b/src/windows/tools.rs @@ -11,7 +11,7 @@ use std::mem::{size_of, zeroed}; use winapi::shared::ntdef::ULARGE_INTEGER; use winapi::{ctypes::c_void, um::winbase::DRIVE_REMOVABLE}; -use winapi::shared::...
1
12
30
a9820a125e2ee6e23f425c7bfcb3811613854836
Andrew Chin
2022-02-26T21:52:43
Add a fallback to get_drive_size on Windows Sometimes the call to `DeviceIoControl` can fail for unknown reasons. This failure will prevent a drive from being visible in `System::disks()`. So try to use a fallback to `GetDiskFreeSapceExW`
diff --git a/src/windows/tools.rs b/src/windows/tools.rs index 2e28197..f3acaec 100644 --- a/src/windows/tools.rs +++ b/src/windows/tools.rs @@ -8,11 +8,13 @@ use crate::sys::processor::{self, Processor, Query}; use std::ffi::OsStr; use std::mem::{size_of, zeroed}; +use winapi::shared::ntdef::ULARGE_INTEGER; use w...
1
18
4
84c369cfa05047ff696ebf6421fd80bf2206a179
Guillaume Gomez
2022-02-24T20:46:12
Update crate version to 0.23.4
diff --git a/Cargo.toml b/Cargo.toml index 11475df..fbe72ce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.23.3" +version = "0.23.4" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
c4e23bd8b8c0abfe28026f4f5f1802756d764477
Guillaume Gomez
2022-02-24T17:17:11
Fix get_physical_core_count on linux (raspberry)
diff --git a/src/linux/processor.rs b/src/linux/processor.rs index 464c3e7..7020dae 100644 --- a/src/linux/processor.rs +++ b/src/linux/processor.rs @@ -257,6 +257,7 @@ pub(crate) fn get_cpu_frequency(cpu_core_index: usize) -> u64 { .unwrap_or_default() } +#[allow(unused_assignments)] pub(crate) fn get_phy...
1
29
6
9f7817222a1346e737a2756d49aa319f66a0844d
Guillaume Gomez
2022-02-23T16:35:54
Update crate version to 0.23.3
diff --git a/Cargo.toml b/Cargo.toml index a963bfd..11475df 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.23.2" +version = "0.23.3" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
883de7d6379bdd97ea68f0f455a4027c1a9ff4d9
Robin Lambertz
2022-02-23T14:03:09
Impl From<Pid> for usize This is a backward-compatible change, as there is a blanket `impl<FROM, TO> Into<TO> for FROM where TO: From<FROM>` in the standard library.
diff --git a/src/common.rs b/src/common.rs index 34b5b7e..9b3611d 100644 --- a/src/common.rs +++ b/src/common.rs @@ -46,12 +46,9 @@ macro_rules! pid_decl { Self(v) } } - #[allow(clippy::from_over_into)] - // This Into implementation is required otherwise it seems you...
1
3
6
0c4525786de956cbd32b1cb856535d4bc5014dd2
Guillaume Gomez
2022-02-11T19:49:53
Remove explicit cast type
diff --git a/src/linux/utils.rs b/src/linux/utils.rs index 2d7bece..cd881a3 100644 --- a/src/linux/utils.rs +++ b/src/linux/utils.rs @@ -18,7 +18,7 @@ pub(crate) fn get_all_data<P: AsRef<Path>>(file_path: P, size: usize) -> io::Res #[allow(clippy::useless_conversion)] pub(crate) fn realpath(original: &Path) -> std:...
1
2
2
59eff438f94cadf88ec59d73bb1bcdac7e607c83
Guillaume Gomez
2022-02-11T17:21:07
Update crate version to 0.23.2
diff --git a/Cargo.toml b/Cargo.toml index c762a71..a963bfd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.23.1" +version = "0.23.2" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
02c63003345d49aceb67d7f233720910a1a5f1da
Guillaume Gomez
2022-02-07T16:34:08
Update crate version to 0.23.1
diff --git a/Cargo.toml b/Cargo.toml index 79a8086..c762a71 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.23.0" +version = "0.23.1" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
7841a92903f6a8e0b0fe64513695bfb89ebd2fb1
Guillaume Gomez
2022-02-07T15:26:18
Fix process refresh issue on Windows
diff --git a/src/windows/system.rs b/src/windows/system.rs index 605c278..08d236d 100644 --- a/src/windows/system.rs +++ b/src/windows/system.rs @@ -186,15 +186,12 @@ impl SystemExt for System { #[allow(clippy::map_entry)] fn refresh_process_specifics(&mut self, pid: Pid, refresh_kind: ProcessRefreshKind) -> ...
2
12
14
7ed2cf780b9547390622c351da70c60d5ffe4667
Guillaume Gomez
2022-02-02T20:17:58
Fix new clippy lint
diff --git a/src/common.rs b/src/common.rs index 2b94e18..34b5b7e 100644 --- a/src/common.rs +++ b/src/common.rs @@ -46,6 +46,9 @@ macro_rules! pid_decl { Self(v) } } + #[allow(clippy::from_over_into)] + // This Into implementation is required otherwise it seems you ...
2
4
0
758efc1dcd623e30966e14783f4f2c434b10ee89
Guillaume Gomez
2022-02-02T20:14:41
Clean up a bit linux processes refresh
diff --git a/src/linux/system.rs b/src/linux/system.rs index 0643c61..1b52040 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -214,8 +214,8 @@ impl System { to_delete.push(*pid); } else if compute_cpu { compute_cpu_usage(proc_, total_time, max_value); + ...
3
95
11
32089b27356608ff1a0f70a1433dbdfb1176c0ad
William Venner
2022-02-07T13:37:23
Make Pid newtype inner value pub(crate) again
diff --git a/src/common.rs b/src/common.rs index 1b4d100..2b94e18 100644 --- a/src/common.rs +++ b/src/common.rs @@ -39,7 +39,7 @@ macro_rules! pid_decl { #[doc = include_str!("../md_doc/pid.md")] #[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] #[repr(transparent)] - ...
1
1
1
07b29d8c2f7382424498c85ec11f568b280e0bc3
William Venner
2022-02-07T13:29:25
Implement Into<T> for Pid
diff --git a/src/common.rs b/src/common.rs index 57b312e..1b4d100 100644 --- a/src/common.rs +++ b/src/common.rs @@ -46,6 +46,11 @@ macro_rules! pid_decl { Self(v) } } + impl Into<$typ> for Pid { + fn into(self) -> $typ { + self.0 + } + ...
1
5
0
00bdf1fca1e4f238d89c698f62c5b2fb08c81e85
William Venner
2022-02-06T21:37:37
Make Pid newtype public for getting raw OS pid
diff --git a/src/common.rs b/src/common.rs index 2292297..57b312e 100644 --- a/src/common.rs +++ b/src/common.rs @@ -38,7 +38,8 @@ macro_rules! pid_decl { ($typ:ty) => { #[doc = include_str!("../md_doc/pid.md")] #[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] - pub stru...
1
2
1
7b540289924639852917c0527f728e4e586a3e34
Guillaume Gomez
2022-01-17T21:17:32
Upgrade crate version to 0.23.0
diff --git a/Cargo.toml b/Cargo.toml index 4730373..79a8086 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.22.5" +version = "0.23.0" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
b3b20e21fdcb547d6caff5b28257d206830d3e2d
Guillaume Gomez
2022-01-17T17:37:01
Fix new clippy lint
diff --git a/src/windows/tools.rs b/src/windows/tools.rs index 9b9428e..2e28197 100644 --- a/src/windows/tools.rs +++ b/src/windows/tools.rs @@ -95,7 +95,7 @@ pub unsafe fn get_disks() -> Vec<Disk> { #[cfg(feature = "multithread")] use rayon::iter::ParallelIterator; - crate::utils::into_iter(0..size_of::...
1
1
1
450577aa207fea0f9e6076f14bd069f6cb687e44
Guillaume Gomez
2022-01-17T17:01:21
Fix uptime on linux
diff --git a/src/linux/process.rs b/src/linux/process.rs index 704c59f..55a9d69 100644 --- a/src/linux/process.rs +++ b/src/linux/process.rs @@ -10,7 +10,7 @@ use std::str::FromStr; use libc::{gid_t, kill, uid_t}; -use crate::sys::system::REMAINING_FILES; +use crate::sys::system::{SystemInfo, REMAINING_FILES}; us...
3
61
42
76e5db90ed47b5af62919b026b3a64a5cbd98532
Guillaume Gomez
2022-01-14T22:20:12
Remove unused field
diff --git a/src/windows/tools.rs b/src/windows/tools.rs index 892aff8..9b9428e 100644 --- a/src/windows/tools.rs +++ b/src/windows/tools.rs @@ -27,12 +27,11 @@ use winapi::um::winnt::{FILE_SHARE_READ, FILE_SHARE_WRITE, HANDLE}; pub(crate) struct KeyHandler { pub unique_id: String, - pub win_key: Vec<u16>, ...
1
4
5
cbc66c9e00df64cdc5c9502e82577f5f6cdb1536
Guillaume Gomez
2022-01-14T20:01:50
Fix documentation and items visibility
diff --git a/src/apple/macos/component.rs b/src/apple/macos/component.rs index 70792c6..4f00f61 100644 --- a/src/apple/macos/component.rs +++ b/src/apple/macos/component.rs @@ -18,7 +18,7 @@ pub(crate) const COMPONENTS_TEMPERATURE_IDS: &[(&str, &[i8])] = &[ ("Battery", &['T' as i8, 'B' as i8, '0' as i8, 'T' as i8]...
21
52
51
00987a031d3e4f12141ad1067ee4c0423fdeccef
Guillaume Gomez
2022-01-14T18:00:03
Add new test to ensure that docs are correctly set
diff --git a/tests/code_checkers/docs.rs b/tests/code_checkers/docs.rs new file mode 100644 index 0000000..a798b19 --- /dev/null +++ b/tests/code_checkers/docs.rs @@ -0,0 +1,135 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +use super::utils::{show_error, TestResult}; +use std::f...
2
137
0
08c3adccd2f2f991ee672a89be681f4088b5b7db
Guillaume Gomez
2022-01-14T16:30:24
Remove Clone implementations on Process structs
diff --git a/src/apple/app_store/process.rs b/src/apple/app_store/process.rs index 1e5b0e1..ca9f78d 100644 --- a/src/apple/app_store/process.rs +++ b/src/apple/app_store/process.rs @@ -5,7 +5,6 @@ use std::path::Path; use crate::{DiskUsage, Pid, ProcessExt, ProcessStatus, Signal}; #[doc = include_str!("../../../md_...
3
0
3
b6e45a97f4675d0139855e02e8f171814a01066b
Guillaume Gomez
2022-01-14T16:21:12
Add doctests to ensure that Clone is not implemented on System and Process
diff --git a/src/lib.rs b/src/lib.rs index 16343c8..c55d61b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -128,6 +128,52 @@ pub fn set_open_files_limit(mut _new_limit: isize) -> bool { } } +// FIXME: Can be removed once negative trait bounds are supported. +#[cfg(doctest)] +mod doctest { + /// Check that `Proc...
1
46
0
7c30fc96c815888274c839d78815f03056884bc2
Guillaume Gomez
2022-01-13T10:42:51
Add test to ensure SystemExt::SUPPORTED_SIGNALS is correctly set
diff --git a/src/lib.rs b/src/lib.rs index 1e1735a..66090bf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -340,4 +340,19 @@ mod test { } assert!(s.physical_core_count().unwrap_or(0) <= s.processors().len()); } + + #[test] + fn check_nb_supported_signals() { + if System::IS_SUPPORTED { ...
1
15
0
459e83f85205b1b824a62dd7c1f2e9cd8da16ae8
Guillaume Gomez
2022-01-13T10:42:31
Extend Signal documentation a bit by mentionning SystemExt::SUPPORTED_SIGNALS
diff --git a/src/common.rs b/src/common.rs index a58f1fc..d113d80 100644 --- a/src/common.rs +++ b/src/common.rs @@ -382,6 +382,9 @@ pub enum DiskType { /// /// On non-unix systems, this enum is mostly useless and is only there to keep coherency between /// the different OSes. +/// +/// If you want the list of the s...
1
3
0
2f174b67989f04f0aab1adc69f3db9504011a963
Guillaume Gomez
2022-01-12T16:40:27
Add missing FIXMEs
diff --git a/src/traits.rs b/src/traits.rs index 44b8259..2bb5467 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -820,6 +820,7 @@ pub trait SystemExt: Sized + Debug + Default + Send + Sync { /// println!("{} {}", process.pid(), process.name()); /// } /// ``` + // FIXME: replace the returned typ...
1
2
0
5a24f0a81d4ad06f47619b74a9eef180ca043bf5
Guillaume Gomez
2022-01-12T16:18:26
* Rename `process_by_name` into `processes_by_name` * Rename `process_by_exact_name` into `processes_by_exact_name` * Changed return type for `processes_by_name` and `processes_by_exact_name`
diff --git a/examples/simple.rs b/examples/simple.rs index b5f3c53..c11f0d8 100644 --- a/examples/simple.rs +++ b/examples/simple.rs @@ -235,7 +235,7 @@ fn interpret_input(input: &str, sys: &mut System) -> bool { }; } else { let proc_name = tmp[1]; - for pro...
2
29
21
57bc168faf2926055b462e082891f3046b3cfd8d
Guillaume Gomez
2022-01-07T11:18:38
Exclude test-unknown folder from cargo package
diff --git a/Cargo.toml b/Cargo.toml index e2e1689..4730373 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ repository = "https://github.com/GuillaumeGomez/sysinfo" license = "MIT" readme = "README.md" rust-version = "1.54" +exclude = ["/test-unknown"] categories = ["filesystem", "os", "api-bindings"]
1
1
0
0172eb8ae00daec0354d95abaf75424c70691c06
Guillaume Gomez
2022-01-07T10:53:01
Upgrade crate version to 0.22.5
diff --git a/Cargo.toml b/Cargo.toml index c94fc08..e2e1689 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.22.4" +version = "0.22.5" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
e9037ec4bfb7c892500bf1ccf28ce6d248902cca
Guillaume Gomez
2022-01-07T10:17:15
Implement Display for Signal
diff --git a/src/common.rs b/src/common.rs index 676d3f6..a58f1fc 100644 --- a/src/common.rs +++ b/src/common.rs @@ -452,6 +452,46 @@ pub enum Signal { Sys, } +impl std::fmt::Display for Signal { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let s = match *self { + ...
1
40
0
54075c95eee84dd63b1655c53d40a3a349b1952f
Guillaume Gomez
2022-01-06T19:41:51
Fix type aliases on unknown targets
diff --git a/src/common.rs b/src/common.rs index 8a4f786..676d3f6 100644 --- a/src/common.rs +++ b/src/common.rs @@ -9,9 +9,20 @@ pub trait AsU32 { } cfg_if::cfg_if! { - if #[cfg(any(windows, target_os = "unknown", target_arch = "wasm32"))] { + if #[cfg(all( + not(feature = "unknown-ci"), + any(...
2
78
42
47110b3441a242af68938fd3c43a183dc7a3cebd
Guillaume Gomez
2022-01-06T22:26:24
Fix type error for 32-bit freebsd (on i386, armv6, armv7, powerpc)
diff --git a/src/freebsd/disk.rs b/src/freebsd/disk.rs index 21d308e..1a81506 100644 --- a/src/freebsd/disk.rs +++ b/src/freebsd/disk.rs @@ -62,8 +62,10 @@ unsafe fn refresh_disk(disk: &mut Disk, vfs: &mut libc::statvfs) -> bool { if libc::statvfs(disk.c_mount_point.as_ptr() as *const _, vfs) < 0 { return...
1
8
4
534f7c310dec64418cb0b8978d49e8216f4102cc
Guillaume Gomez
2022-01-03T17:50:27
Fix new clippy lints
diff --git a/src/freebsd/process.rs b/src/freebsd/process.rs index 8ccb293..d5419de 100644 --- a/src/freebsd/process.rs +++ b/src/freebsd/process.rs @@ -201,7 +201,7 @@ pub(crate) unsafe fn get_process_data( ], &mut buffer, ) - .unwrap_or_else(String::new); + .unwrap_or_default(); // F...
2
2
2
7c419adb3498b169064bb0e583c2ba3acb854a74
Guillaume Gomez
2022-01-03T17:17:30
Add code checks to ensure signals are correctly declared
diff --git a/tests/code_checkers/headers.rs b/tests/code_checkers/headers.rs index 8fccab5..ac7a34d 100644 --- a/tests/code_checkers/headers.rs +++ b/tests/code_checkers/headers.rs @@ -1,9 +1,9 @@ // Take a look at the license at the top of the repository in the LICENSE file. -use super::utils::show_error; +use supe...
4
123
20
763e46b7ccd404f2ac00f0460552410bdf7711bb
Guillaume Gomez
2022-01-03T16:40:57
Rework code test checkers
diff --git a/tests/code_checkers/headers.rs b/tests/code_checkers/headers.rs index 9191714..8fccab5 100644 --- a/tests/code_checkers/headers.rs +++ b/tests/code_checkers/headers.rs @@ -1,38 +1,9 @@ // Take a look at the license at the top of the repository in the LICENSE file. -use std::fs::{read_dir, File}; -use st...
3
74
40
6558c71573bc022bd8d0a0ec5c066bd07ebe32d5
Guillaume Gomez
2021-12-31T10:32:06
Add SUPPORTED_SIGNALS constant on SystemExt
diff --git a/src/apple/app_store/process.rs b/src/apple/app_store/process.rs index 3c4aa20..27eb18b 100644 --- a/src/apple/app_store/process.rs +++ b/src/apple/app_store/process.rs @@ -9,10 +9,6 @@ use crate::{DiskUsage, Pid, ProcessExt, ProcessStatus, Signal}; pub struct Process; impl ProcessExt for Process { - ...
14
221
156
c2ffcc5cb53e63f81d6082675b92b947a5420f88
songfanzhen
2021-12-31T08:18:05
add function.
diff --git a/src/traits.rs b/src/traits.rs index bf0629f..ddd1809 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -809,6 +809,26 @@ pub trait SystemExt: Sized + Debug + Default + Send + Sync { ret } + /// Returns a list of process with exactly the given `name`. + /// + /// ```no_run + /// ...
1
20
0
55222be8c25a8ce1d7b8fa885f731153e771f13d
Guillaume Gomez
2021-12-29T12:33:04
Improve documentation for linux processes query
diff --git a/src/traits.rs b/src/traits.rs index bea8756..bf0629f 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -615,6 +615,9 @@ pub trait SystemExt: Sized + Debug + Default + Send + Sync { /// /// It does the same as `system.refresh_processes_specifics(ProcessRefreshKind::everything())`. /// + //...
1
6
0
0365a5b8227046bfee8a2d5a12bfa33e8b198dd9
Guillaume Gomez
2021-12-28T21:54:31
Upgrade crate version to 0.22.4
diff --git a/Cargo.toml b/Cargo.toml index da8f0a3..c94fc08 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.22.3" +version = "0.22.4" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
04406372b284ebde04c26862decc811f50bfcb07
Guillaume Gomez
2021-12-24T11:06:11
Fix panic when changing the limit of open files
diff --git a/src/lib.rs b/src/lib.rs index a29dd7f..b901af2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -129,8 +129,8 @@ pub fn set_open_files_limit(mut _new_limit: isize) -> bool { // If files are already open, to be sure that the number won't be bigger when those // files are closed,...
1
2
2
705feaa5ee670387c8dab7f092a08aa8d6c6e2f8
Mohammed Alyousef
2021-12-27T12:54:59
check state of COM initialization
diff --git a/src/windows/component.rs b/src/windows/component.rs index 9ee6fb2..70e3322 100644 --- a/src/windows/component.rs +++ b/src/windows/component.rs @@ -8,7 +8,7 @@ use winapi::shared::rpcdce::{ RPC_C_AUTHN_LEVEL_CALL, RPC_C_AUTHN_LEVEL_DEFAULT, RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, RPC_C_IMP_LEVEL_IMP...
1
8
6
f3d3a1d6d7de6395e67e961d6d27eb952bf7f07d
Guillaume Gomez
2021-12-19T14:48:09
Upgrade version to 0.22.3
diff --git a/Cargo.toml b/Cargo.toml index 455b1a6..da8f0a3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.22.2" +version = "0.22.3" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
cc1e1bf875995ffc25280db715c0504c85f16ab1
Guillaume Gomez
2021-12-19T13:43:59
Take into account ZFS ARC value when computing used memory on freebsd
diff --git a/src/freebsd/system.rs b/src/freebsd/system.rs index 8876e4f..d23536c 100644 --- a/src/freebsd/system.rs +++ b/src/freebsd/system.rs @@ -390,6 +390,44 @@ impl System { } } +#[derive(Debug)] +struct Zfs { + enabled: bool, + mib_arcstats_size: [c_int; 5], +} + +impl Zfs { + fn new() -> Self {...
1
46
1
dfbd47c741e6aaf36efeb19f86f39d9415339dd9
Guillaume Gomez
2021-12-19T13:23:00
Remove the CPUSTATES constant and use the libc one instead
diff --git a/src/freebsd/system.rs b/src/freebsd/system.rs index e9bb596..8876e4f 100644 --- a/src/freebsd/system.rs +++ b/src/freebsd/system.rs @@ -390,9 +390,6 @@ impl System { } } -// FIXME: to be removed once 0.2.108 libc has been published! -const CPUSTATES: usize = 5; - /// This struct is used to get sys...
1
5
7
c6fe8860dd78a93c870089db8b2078652b559330
Guillaume Gomez
2021-12-19T13:50:04
Fix clippy lints
diff --git a/src/common.rs b/src/common.rs index a4b33e8..4fb67e0 100644 --- a/src/common.rs +++ b/src/common.rs @@ -63,6 +63,7 @@ assert_eq!(r.", stringify!($name), "(), false); let r = r.with_", stringify!($name), "(); assert_eq!(r.", stringify!($name), "(), true); ```")] + #[must_use] pub fn $with...
1
4
0
28ecb789d939be368741f5b1c184c3137576dbdd
Guillaume Gomez
2021-12-15T15:35:05
Fix code comment typo
diff --git a/src/freebsd/system.rs b/src/freebsd/system.rs index d47231c..e9bb596 100644 --- a/src/freebsd/system.rs +++ b/src/freebsd/system.rs @@ -543,8 +543,8 @@ impl SystemInfo { /// Returns (used, total). fn get_swap_info(&self) -> (u64, u64) { - // Magic number used in htop. Cannot find how the...
1
2
2
83476856726df401e9a7a267dbffefa00b78d842
Guillaume Gomez
2021-12-15T15:27:26
Upgrade crate version to 0.22.2
diff --git a/Cargo.toml b/Cargo.toml index ddde943..455b1a6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.22.1" +version = "0.22.2" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
6d9e0302d54b7556d03c616c7ab5fc4df2151eeb
Guillaume Gomez
2021-12-15T15:18:12
Improve memory information retrieval on FreeBSD
diff --git a/src/freebsd/process.rs b/src/freebsd/process.rs index 76e9449..d01a9b2 100644 --- a/src/freebsd/process.rs +++ b/src/freebsd/process.rs @@ -202,7 +202,7 @@ pub(crate) unsafe fn get_process_data( // from FreeBSD source /src/usr.bin/top/machine.c let virtual_memory = (kproc.ki_size / 1_000) as u6...
3
29
21
681d6324adcafd71beecadb79564dd936d0e4c31
Guillaume Gomez
2021-12-15T10:39:35
Upgrade crate version to 0.22.1
diff --git a/Cargo.toml b/Cargo.toml index 4de8f36..ddde943 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.22.0" +version = "0.22.1" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
f8aa29e859e1cee013fb16c1e747c0f69273a372
Guillaume Gomez
2021-12-15T10:38:47
Remove forgotten debug
diff --git a/src/linux/process.rs b/src/linux/process.rs index f840cea..07a6234 100644 --- a/src/linux/process.rs +++ b/src/linux/process.rs @@ -399,9 +399,6 @@ pub(crate) fn _get_process_data( }; let start_time = u64::from_str(parts[21]).unwrap_or(0) / clock_cycle; - if pid == crate::get_current_pid().u...
1
0
3
d7b9dc228237d4a7a0e7b24a3a1dccfae363bdb2
Guillaume Gomez
2021-12-14T16:13:46
Upgrade crate version to 0.22
diff --git a/Cargo.toml b/Cargo.toml index 1c8448f..4de8f36 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.21.2" +version = "0.22.0" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
ad3588026ded11e946c283b6023cab5e5fe5550e
Guillaume Gomez
2021-12-13T16:52:49
Add ProcessExt::run_time
diff --git a/src/apple/app_store/process.rs b/src/apple/app_store/process.rs index e248443..3c4aa20 100644 --- a/src/apple/app_store/process.rs +++ b/src/apple/app_store/process.rs @@ -9,10 +9,6 @@ use crate::{DiskUsage, Pid, ProcessExt, ProcessStatus, Signal}; pub struct Process; impl ProcessExt for Process { - ...
12
217
154
675f72da4aee6f7f5cd21386fe8eae8c462c47b5
Guillaume Gomez
2021-12-11T16:36:52
Enforce that SystemExt implements Send and Sync
diff --git a/src/traits.rs b/src/traits.rs index 688f089..58dd1df 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -425,7 +425,7 @@ pub trait ProcessorExt: Debug { } /// Contains all the methods of the [`System`][crate::System] type. -pub trait SystemExt: Sized + Debug + Default { +pub trait SystemExt: Sized + Deb...
1
1
1
67a586c695734eef80a986a0ffd6065b1db7d343
Guillaume Gomez
2021-12-10T17:55:03
Only update processors if needed
diff --git a/src/apple/processor.rs b/src/apple/processor.rs index 06b6171..f16cd91 100644 --- a/src/apple/processor.rs +++ b/src/apple/processor.rs @@ -192,22 +192,17 @@ pub(crate) fn update_processor_usage<F: FnOnce(Arc<ProcessorData>, *mut i32) -> global_processor.set_cpu_usage(total_cpu_usage); } -pub fn in...
9
139
63
0a8a87b2604667ddaec8fb1a442cc08b2396820a
Guillaume Gomez
2021-12-10T09:45:18
Remove eprintln call
diff --git a/src/linux/system.rs b/src/linux/system.rs index 8dc336e..b5deb14 100644 --- a/src/linux/system.rs +++ b/src/linux/system.rs @@ -133,7 +133,6 @@ impl System { fn clear_procs(&mut self, refresh_kind: ProcessRefreshKind) { let (total_time, compute_cpu, max_value) = if refresh_kind.cpu() { - ...
1
0
1
6354be7338f14d588fb3d11ef14a7d198f95c967
Guillaume Gomez
2021-12-09T21:11:53
Add possibility to specify what to update in processes
diff --git a/src/apple/macos/process.rs b/src/apple/macos/process.rs index 0db82e1..c6ff7a6 100644 --- a/src/apple/macos/process.rs +++ b/src/apple/macos/process.rs @@ -9,7 +9,7 @@ use std::borrow::Borrow; use libc::{c_int, c_void, gid_t, kill, size_t, uid_t}; -use crate::{DiskUsage, Pid, ProcessExt, ProcessStatus...
9
324
117
669c587ac73ead5571ad1d0b927fe2e4b915613d
Guillaume Gomez
2021-12-09T19:17:00
Change ProcessExt::kill API to allow finer control
diff --git a/examples/simple.rs b/examples/simple.rs index 4c7c866..13705a1 100644 --- a/examples/simple.rs +++ b/examples/simple.rs @@ -271,7 +271,7 @@ fn interpret_input(input: &str, sys: &mut System) -> bool { if tmp.len() != 3 { writeln!( &mut io::stdout(), - ...
7
67
17
440f73d7fd9033fffca72ed0e1f3e716bf47ed20
Guillaume Gomez
2021-12-08T12:58:03
Upgrade crate version to 0.21.2
diff --git a/Cargo.toml b/Cargo.toml index 147f780..e9c2d68 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.21.1" +version = "0.21.2" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
3c3c5a0424c4f623a3eb2b81075c3205283a530a
Guillaume Gomez
2021-12-08T11:05:00
Add debug info in Windows::processor
diff --git a/src/windows/processor.rs b/src/windows/processor.rs index 5593f24..64eb2ed 100644 --- a/src/windows/processor.rs +++ b/src/windows/processor.rs @@ -84,6 +84,7 @@ unsafe fn init_load_avg() -> Mutex<Option<LoadAvg>> { let mut query = null_mut(); if PdhOpenQueryA(null_mut(), 0, &mut query) != ERRO...
1
20
2
3459324a369ea00cac47f04e536eb84052ecd9fe
Guillaume Gomez
2021-12-08T12:41:02
Fix clippy lints
diff --git a/src/linux/component.rs b/src/linux/component.rs index 3088b27..8852d01 100644 --- a/src/linux/component.rs +++ b/src/linux/component.rs @@ -93,12 +93,12 @@ fn append_files(components: &mut Vec<Component>, folder: &Path) { if is_file(&p_input) { let label = get_file_lin...
2
6
6
97cc6004a392ef594dc582733709e39b562c62f8
onlyacat
2021-12-06T06:13:20
add rootfs into the filter of vfstype; Close #622;
diff --git a/src/linux/disk.rs b/src/linux/disk.rs index 5399a51..1714cdc 100644 --- a/src/linux/disk.rs +++ b/src/linux/disk.rs @@ -223,6 +223,7 @@ fn get_all_disks_inner(content: &str) -> Vec<Disk> { // Check if fs_vfstype is one of our 'ignored' file systems. let filtered = matches!( ...
1
1
0
5e7c2a58f572153ac9b5ea423437b0d79214ec90
Guillaume Gomez
2021-11-24T10:14:20
Remove (very) old attributes
diff --git a/src/lib.rs b/src/lib.rs index eb1cce8..cefb992 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,8 +1,5 @@ // Take a look at the license at the top of the repository in the LICENSE file. -#![crate_name = "sysinfo"] -#![crate_type = "lib"] -#![crate_type = "rlib"] #![doc = include_str!("../README.md")] #!...
1
0
3
0da52b5c7cedaf6f249213ce7218408be57af969
roblabla
2021-11-22T10:06:09
Lazily create query
diff --git a/src/windows/system.rs b/src/windows/system.rs index 5c041ed..8d7967e 100644 --- a/src/windows/system.rs +++ b/src/windows/system.rs @@ -91,32 +91,35 @@ impl SystemExt for System { processors, components: Vec::new(), disks: Vec::with_capacity(2), - query: Qu...
1
20
17
b4011a109e619ac6b2e48b55835c867855ccfee8
Guillaume Gomez
2021-11-21T21:04:41
Fix failing windows test
diff --git a/tests/process.rs b/tests/process.rs index 34bc10b..3dfc0a3 100644 --- a/tests/process.rs +++ b/tests/process.rs @@ -85,7 +85,10 @@ fn test_cmd() { assert!(!s.processes().is_empty()); if let Some(process) = s.process(p.id() as sysinfo::Pid) { if cfg!(target_os = "windows") { - ...
1
4
1
6c228400e2e47aa25a84da77fdc2bd8f28f69c49
Guillaume Gomez
2021-11-21T19:44:13
Clean up common functions
diff --git a/src/common.rs b/src/common.rs index 279a4bf..9ba4f13 100644 --- a/src/common.rs +++ b/src/common.rs @@ -558,6 +558,52 @@ pub enum ProcessStatus { Unknown(u32), } +/// Returns the pid for the current process. +/// +/// `Err` is returned in case the platform isn't supported. +/// +/// ```no_run +/// ...
6
101
94
c4a6c3bf1c5cfef8150610f3fa803193bc72dafb
Guillaume Gomez
2021-11-21T15:38:09
Fix build failures on unknown targets
diff --git a/src/unknown/network.rs b/src/unknown/network.rs index 448b431..4a8ff48 100644 --- a/src/unknown/network.rs +++ b/src/unknown/network.rs @@ -18,7 +18,7 @@ impl Networks { } impl NetworksExt for Networks { - fn iter<'a>(&'a self) -> NetworksIter<'a> { + fn iter(&self) -> NetworksIter { Net...
2
6
5
ce03f71d9029ce55b2ecac982916b2da34d50721
Guillaume Gomez
2021-11-18T16:31:29
Clean up sysctl calls
diff --git a/src/apple/macos/process.rs b/src/apple/macos/process.rs index f38edbc..0db82e1 100644 --- a/src/apple/macos/process.rs +++ b/src/apple/macos/process.rs @@ -333,7 +333,6 @@ pub(crate) fn update_process( mut size: size_t, time_interval: Option<f64>, ) -> Result<Option<Process>, ()> { - let mut ...
3
20
13
531576e1b9bff3b49b1767b3c2ace565d16ad05b
Guillaume Gomez
2021-11-18T14:03:32
Improve refresh_process test
diff --git a/src/system.rs b/src/system.rs index 3adc90d..934e7ac 100644 --- a/src/system.rs +++ b/src/system.rs @@ -24,7 +24,6 @@ mod tests { fn test_refresh_process() { let mut sys = System::new(); assert!(sys.processes().is_empty(), "no process should be listed!"); - sys.refresh_process...
1
4
1
011114fc2a1ca7919f5c658eb3e22c0a7b37302f
roblabla
2021-11-18T11:34:18
Use PdhAddEnglishCounter to get CPU usage. PdhAddCounter requires getting the localized name of a performance counter, which requires going through some fairly poorly documented APIs, and is error-prone. On the other hand, PdhAddEnglishCounter may be used to get the performance counters in a language-neutral way, grea...
diff --git a/src/windows/processor.rs b/src/windows/processor.rs index f1836ba..5593f24 100644 --- a/src/windows/processor.rs +++ b/src/windows/processor.rs @@ -16,7 +16,7 @@ use winapi::shared::minwindef::FALSE; use winapi::shared::winerror::{ERROR_INSUFFICIENT_BUFFER, ERROR_SUCCESS}; use winapi::um::handleapi::Clos...
3
18
115
e7e75f0ba803dd677122e981865589eb9fd1f043
Guillaume Gomez
2021-11-17T17:14:35
Improve ProcessStatus documentation
diff --git a/src/common.rs b/src/common.rs index c08a0a8..279a4bf 100644 --- a/src/common.rs +++ b/src/common.rs @@ -504,7 +504,7 @@ pub enum ProcessStatus { Stop, /// ## Linux /// - /// Zombie. + /// Zombie process. Terminated but not reaped by its parent. /// /// ## macOS /// @@ -5...
1
3
3
ae4495eddbbf7f1659279ac9f9c64682570f2d8e
Guillaume Gomez
2021-11-17T14:41:56
Include other Processor fields in Debug impl
diff --git a/src/debug.rs b/src/debug.rs index a427716..b2ce91c 100644 --- a/src/debug.rs +++ b/src/debug.rs @@ -12,6 +12,9 @@ impl fmt::Debug for Processor { f.debug_struct("Processor") .field("name", &self.name()) .field("CPU usage", &self.cpu_usage()) + .field("frequency...
1
3
0
871fafbb8b2b3257bb94f0c6c91ae207a916efcf
Guillaume Gomez
2021-11-15T11:25:19
Add test to ensure that the license used in the headers is the correct one
diff --git a/tests/code_checkers/headers.rs b/tests/code_checkers/headers.rs new file mode 100644 index 0000000..9191714 --- /dev/null +++ b/tests/code_checkers/headers.rs @@ -0,0 +1,82 @@ +// Take a look at the license at the top of the repository in the LICENSE file. + +use std::fs::{read_dir, File}; +use std::io::Re...
9
94
30
81dc2d68bf75e4674060d587b5ce4edb7c797acc
Guillaume Gomez
2021-11-10T22:47:51
Add minimum supported rust version into Cargo.toml
diff --git a/Cargo.toml b/Cargo.toml index 28e5298..1b90dbe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,7 @@ description = "Library to get system information such as processes, processors, repository = "https://github.com/GuillaumeGomez/sysinfo" license = "MIT" readme = "README.md" +rust-version = "1.54" ...
1
1
0
548411817f05f395f8d4c9e0b8f371b8c5bc28ce
Guillaume Gomez
2021-11-10T22:33:15
Upgrade crate version to 0.21.1
diff --git a/Cargo.toml b/Cargo.toml index 2d505a5..28e5298 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.21.0" +version = "0.21.1" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
1b087264d14d20626f5d29fe6f6d5da5c03f32c3
Guillaume Gomez
2021-11-10T20:57:25
Update tests
diff --git a/src/common.rs b/src/common.rs index 1ba00f8..2ce3123 100644 --- a/src/common.rs +++ b/src/common.rs @@ -568,6 +568,7 @@ mod tests { // This test only exists to ensure that the `Display` trait is implemented on the // `ProcessStatus` enum on all targets. + #[test] fn check_display_impl_p...
2
8
3
238da4b37a340115d575206c47407d1e2574d155
Guillaume Gomez
2021-11-10T20:57:20
Various improvements on CPU usage computation and processors update
diff --git a/src/linux/process.rs b/src/linux/process.rs index 79a4ce0..059a65b 100644 --- a/src/linux/process.rs +++ b/src/linux/process.rs @@ -249,16 +249,19 @@ impl Drop for Process { } } -pub fn compute_cpu_usage(p: &mut Process, nb_processors: u64, total_time: f32) { +pub fn compute_cpu_usage(p: &mut Proce...
2
54
47
5030e84ce46bd670bbf177119932f52c318e9d01
Guillaume Gomez
2021-11-10T19:00:42
Upgrade crate version to 0.21
diff --git a/Cargo.toml b/Cargo.toml index 14ce0ae..2d505a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.20.5" +version = "0.21.0" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] description = "Library to get system information such as processes, pro...
1
1
1
dd713a070f8be1f9631a7d5ee90e681bc13bf2fe
Guillaume Gomez
2021-11-10T18:00:59
Fix clippy warnings
diff --git a/src/apple/macos/process.rs b/src/apple/macos/process.rs index ef7c5f9..29e70f0 100644 --- a/src/apple/macos/process.rs +++ b/src/apple/macos/process.rs @@ -603,6 +603,7 @@ fn update_proc_disk_activity(p: &mut Process) { } } +#[allow(clippy::uninit_vec)] pub(crate) fn get_proc_list() -> Option<Vec<...
7
10
0
0b8ff82941656b71821e1661f06e7d9edb33448a
Guillaume Gomez
2021-11-10T16:59:05
Fix processes CPU computation
diff --git a/src/linux/process.rs b/src/linux/process.rs index 85bd8d8..79a4ce0 100644 --- a/src/linux/process.rs +++ b/src/linux/process.rs @@ -317,6 +317,7 @@ impl<'a, T> Wrap<'a, T> { } } +#[allow(clippy::non_send_fields_in_send_ty)] unsafe impl<'a, T> Send for Wrap<'a, T> {} unsafe impl<'a, T> Sync for Wr...
2
26
12
7cfcfd6057fb51f7e9017b7ed6123512d8e93dc3
Guillaume Gomez
2021-10-15T13:42:03
Fix build for unknown targets
diff --git a/src/unknown/process.rs b/src/unknown/process.rs index e267073..0103097 100644 --- a/src/unknown/process.rs +++ b/src/unknown/process.rs @@ -71,7 +71,7 @@ impl ProcessExt for Process { } fn status(&self) -> ProcessStatus { - ProcessStatus + ProcessStatus::Unknown(0) } f...
1
1
1
0f1d56a628722ba77139a71c8ffe98154b038052
Guillaume Gomez
2021-10-14T17:40:15
Make ProcessStatus enum unique for all platforms
diff --git a/src/apple/mod.rs b/src/apple/mod.rs index 99e1655..c0ce572 100644 --- a/src/apple/mod.rs +++ b/src/apple/mod.rs @@ -30,6 +30,6 @@ mod utils; pub use self::component::Component; pub use self::disk::Disk; pub use self::network::{NetworkData, Networks}; -pub use self::process::{Process, ProcessStatus}; +pu...
10
141
97