Skip to content

Commit

Permalink
Merge pull request #1654 from maryamtahhan/hotfix-process-energy
Browse files Browse the repository at this point in the history
chore: remove unused variable in addEstimatedEnergy
  • Loading branch information
dave-tucker authored Jul 31, 2024
2 parents 287496a + 70c01c0 commit 870990b
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions pkg/model/process_energy.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ func addSamplesToPowerModels(processesMetrics map[uint64]*stats.ProcessStats, no

// addEstimatedEnergy estimates the idle power consumption
func addEstimatedEnergy(processIDList []uint64, processesMetrics map[uint64]*stats.ProcessStats, isIdlePower bool) {
var err error
var processGPUPower []uint64
var processPlatformPower []uint64
var processComponentsPower []source.NodeComponentsEnergy
Expand Down Expand Up @@ -224,9 +223,6 @@ func addEstimatedEnergy(processIDList []uint64, processesMetrics map[uint64]*sta
} else {
processesMetrics[processID].EnergyUsage[config.DynEnergyInPkg].SetDeltaStat(utils.GenericSocketID, energy)
}
if err != nil {
klog.V(5).Infoln(err)
}

// add CORE power consumption
energy = processComponentsPower[i].Core * config.SamplePeriodSec
Expand All @@ -235,9 +231,6 @@ func addEstimatedEnergy(processIDList []uint64, processesMetrics map[uint64]*sta
} else {
processesMetrics[processID].EnergyUsage[config.DynEnergyInCore].SetDeltaStat(utils.GenericSocketID, energy)
}
if err != nil {
klog.V(5).Infoln(err)
}

// add DRAM power consumption
energy = processComponentsPower[i].DRAM * config.SamplePeriodSec
Expand All @@ -246,9 +239,6 @@ func addEstimatedEnergy(processIDList []uint64, processesMetrics map[uint64]*sta
} else {
processesMetrics[processID].EnergyUsage[config.DynEnergyInDRAM].SetDeltaStat(utils.GenericSocketID, energy)
}
if err != nil {
klog.V(5).Infoln(err)
}

// add Uncore power consumption
energy = processComponentsPower[i].Uncore * config.SamplePeriodSec
Expand All @@ -257,9 +247,6 @@ func addEstimatedEnergy(processIDList []uint64, processesMetrics map[uint64]*sta
} else {
processesMetrics[processID].EnergyUsage[config.DynEnergyInUnCore].SetDeltaStat(utils.GenericSocketID, energy)
}
if err != nil {
klog.V(5).Infoln(err)
}

// add GPU power consumption
if errGPU == nil {
Expand All @@ -269,9 +256,6 @@ func addEstimatedEnergy(processIDList []uint64, processesMetrics map[uint64]*sta
} else {
processesMetrics[processID].EnergyUsage[config.DynEnergyInGPU].SetDeltaStat(utils.GenericSocketID, energy)
}
if err != nil {
klog.V(5).Infoln(err)
}
}
}

Expand All @@ -282,9 +266,6 @@ func addEstimatedEnergy(processIDList []uint64, processesMetrics map[uint64]*sta
} else {
processesMetrics[processID].EnergyUsage[config.DynEnergyInPlatform].SetDeltaStat(utils.GenericSocketID, energy)
}
if err != nil {
klog.V(5).Infoln(err)
}
}

// estimate other components power if both platform and components power are available
Expand All @@ -302,9 +283,6 @@ func addEstimatedEnergy(processIDList []uint64, processesMetrics map[uint64]*sta
} else {
processesMetrics[processID].EnergyUsage[config.DynEnergyInOther].SetDeltaStat(utils.GenericSocketID, energy)
}
if err != nil {
klog.V(5).Infoln(err)
}
}
}
}

0 comments on commit 870990b

Please sign in to comment.