summaryrefslogtreecommitdiffstats
path: root/src/data_collection/processes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/data_collection/processes.rs')
-rw-r--r--src/data_collection/processes.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/data_collection/processes.rs b/src/data_collection/processes.rs
index 08b48a29..ef96c818 100644
--- a/src/data_collection/processes.rs
+++ b/src/data_collection/processes.rs
@@ -74,7 +74,7 @@ pub struct ProcessHarvest {
/// The current state of the process (e.g. zombie, asleep).
pub process_state: (String, char),
- /// Cumulative total CPU time used.
+ /// Cumulative process uptime.
pub time: Duration,
/// This is the *effective* user ID of the process. This is only used on Unix platforms.
@@ -109,7 +109,7 @@ impl ProcessHarvest {
self.write_bytes_per_sec += rhs.write_bytes_per_sec;
self.total_read_bytes += rhs.total_read_bytes;
self.total_write_bytes += rhs.total_write_bytes;
- self.time += rhs.time;
+ self.time = self.time.max(rhs.time);
#[cfg(feature = "gpu")]
{
self.gpu_mem += rhs.gpu_mem;