Skip to content

Commit a2648cb

Browse files
committed
test: terminated resources are cleared once exported
Signed-off-by: Sunil Thaha <[email protected]>
1 parent 7acb235 commit a2648cb

File tree

3 files changed

+387
-14
lines changed

3 files changed

+387
-14
lines changed

internal/monitor/container.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,7 @@ func (pm *PowerMonitor) calculateContainerPower(prev, newSnapshot *Snapshot) err
9898
newSnapshot.TerminatedContainers[id] = terminatedContainer
9999
}
100100

101-
// Skip if no containers
102-
if len(cntrs.Running) == 0 {
103-
pm.logger.Debug("No running containers found, skipping container power calculation")
104-
return nil
105-
}
106-
101+
// process running containers
107102
zones := newSnapshot.Node.Zones
108103
node := pm.resources.Node()
109104
nodeCPUTimeDelta := node.ProcessTotalCPUTimeDelta

0 commit comments

Comments
 (0)