Skip to content

Commit

Permalink
fix missing energysource in power request
Browse files Browse the repository at this point in the history
Signed-off-by: Sunyanan Choochotkaew <[email protected]>
  • Loading branch information
sunya-ch committed Aug 23, 2023
1 parent a4a9430 commit c358d73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/collector/metric/node_metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ func (ne *NodeMetrics) UpdateDynEnergy() {

func (ne *NodeMetrics) CalcDynEnergy(component, id string) {
total := ne.getAbsoluteEnergyStatCollection(component).Stat[id].Delta
fmt.Printf("Energy stat: %v (%s)", ne.getIdleEnergyStatCollection(component).Stat, id)
klog.V(5).Infof("Energy stat: %v (%s)", ne.getIdleEnergyStatCollection(component).Stat, id)
idle := ne.getIdleEnergyStatCollection(component).Stat[id].Delta
dyn := calcDynEnergy(total, idle)
ne.getDynEnergyStatCollection(component).SetDeltaStat(id, dyn)
Expand Down
1 change: 1 addition & 0 deletions pkg/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ func createPowerModelEstimator(modelConfig *types.ModelConfig) (PowerMoldelInter
FloatFeatureNames: featuresNames,
SystemMetaDataFeatureNames: modelConfig.SystemMetaDataFeatureNames,
SystemMetaDataFeatureValues: modelConfig.SystemMetaDataFeatureValues,
EnergySource: modelConfig.EnergySource,
}
err := model.Start()
if err != nil {
Expand Down

0 comments on commit c358d73

Please sign in to comment.