Skip to content

Commit 299f7b4

Browse files
author
Marcelo Amaral
committed
pkg:collector: remove the dram energy from the host other components energy consumption
Signed-off-by: Marcelo Amaral <[email protected]>
1 parent 8558c37 commit 299f7b4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/collector/node_energy.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,9 @@ func (v *NodeEnergy) SetValues(sensorEnergy map[string]float64, pkgEnergy map[in
9595
fmt.Printf("node energy stat core %v dram %v uncore %v pkg %v gpu %v sensor %v\n", v.EnergyInCore, v.EnergyInDRAM, v.EnergyInUncore, v.EnergyInPkg, v.EnergyInGPU, v.SensorEnergy)
9696
totalSensorDelta := v.SensorEnergy.Curr()
9797
totalPkgDelta := v.EnergyInPkg.Curr()
98+
totalDramDelta := v.EnergyInDRAM.Curr()
9899
if totalSensorDelta > (totalPkgDelta + totalGPUDelta) {
99-
v.EnergyInOther = totalSensorDelta - (totalPkgDelta + totalGPUDelta)
100+
v.EnergyInOther = totalSensorDelta - (totalPkgDelta + totalGPUDelta + totalDramDelta)
100101
}
101102
v.Usage = usage
102103
}

0 commit comments

Comments
 (0)