refactor(agent): remove unused FsStats.Time

The disk I/O seed now reads from diskBaseline, so nothing reads
FsStats.Time anymore.
This commit is contained in:
henrygd
2026-09-25 13:49:53 -04:00
parent 433b83800f
commit 7bea20e3b6
3 changed files with 16 additions and 17 deletions

View File

@@ -596,7 +596,6 @@ func (a *Agent) initializeDiskIoStats(diskIoCounters map[string]disk.IOCountersS
continue
}
// populate initial values
stats.Time = now
stats.TotalRead = d.ReadBytes
stats.TotalWrite = d.WriteBytes
a.setDiskBaseline(device, prevDiskFromCounter(d, now))
@@ -742,9 +741,8 @@ func (a *Agent) updateDiskIo(cacheTimeMs uint16, systemStats *system.Stats) {
wAwait = utils.TwoDecimals(float64(deltaWriteTime) / float64(deltaWriteCount))
}
// Update global fsStats baseline for cross-interval correctness
// Update the baseline that seeds new intervals
a.setDiskBaseline(name, prevDiskFromCounter(d, now))
stats.Time = now
stats.TotalRead = d.ReadBytes
stats.TotalWrite = d.WriteBytes
stats.DiskReadPs = readMbPerSecond