Skip to content

Commit

Permalink
Add documentation about DiskUsage::read_bytes not increasing
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Nov 1, 2024
1 parent e7a9fec commit b39e427
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/common/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,10 @@ pub struct CGroupLimits {
///
/// It is returned by [`Process::disk_usage`][crate::Process::disk_usage].
///
/// ⚠️ Files might be cached in memory by your OS, meaning that reading/writing them might not
/// increase the `read_bytes`/`written_bytes` values. You can find more information about it
/// in the `proc_pid_io` manual (`man proc_pid_io` on unix platforms).
///
/// ```no_run
/// use sysinfo::System;
///
Expand Down Expand Up @@ -1440,6 +1444,10 @@ impl Process {
/// ⚠️ On Windows, this method actually returns **ALL** I/O read and
/// written bytes.
///
/// ⚠️ Files might be cached in memory by your OS, meaning that reading/writing them might not
/// increase the `read_bytes`/`written_bytes` values. You can find more information about it
/// in the `proc_pid_io` manual (`man proc_pid_io` on unix platforms).
///
/// ```no_run
/// use sysinfo::{Pid, System};
///
Expand Down

0 comments on commit b39e427

Please sign in to comment.