Skip to content

Commit

Permalink
fix(host): previous time of container_diskio (#21910)
Browse files Browse the repository at this point in the history
  • Loading branch information
zexi authored Dec 31, 2024
1 parent 34204c5 commit c134969
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/hostman/hostmetrics/container_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ func (m *SGuestMonitor) PodMetrics(prevUsage *GuestMetrics) *PodMetrics {
if prevCtrM != nil {
if prevCtrM.ContainerDiskIos != nil {
prevStat = prevCtrM.ContainerDiskIos.ToCadvisorDiskIoMetrics()
prevTime = prevCtrM.ContainerCpu.Time
}
}
cm.ContainerDiskIos = newContainerDiskioMetrics(m.getCadvisorDiskIoMetrics(ctr.DiskIo, prevStat, ctrMeta.Time, prevTime), ctrMeta)
Expand Down

0 comments on commit c134969

Please sign in to comment.