Skip to content

Commit

Permalink
print new energy values
Browse files Browse the repository at this point in the history
Signed-off-by: MohammedAbdi <[email protected]>
  • Loading branch information
mamy-CS committed Aug 1, 2024
1 parent 9947d3c commit 6ef6f12
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/controller/labelgroup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,9 @@ func (r *LabelGroupReconciler) Reconcile(ctx context.Context, req ctrl.Request)
// - In the set of new containers, remove all containers that are active
for containerId, oldValue := range labelGroup.Status.ActiveContainerIds {
if newValue, found := metricValues[containerId]; found {
// totalEnergy += (newValue - oldValue) //put back
r.Logger.V(5).Info(fmt.Sprintf("[Reconcile-Aggregating] oldValue: %#v", oldValue))
totalEnergy = 100 // testing purpose - remove after
totalEnergy += (newValue - oldValue)
r.Logger.V(5).Info(fmt.Sprintf("[Reconcile-Aggregating] newValue: %#v", newValue)) // trace
r.Logger.V(5).Info(fmt.Sprintf("[Reconcile-Aggregating] oldValue: %#v", oldValue)) // trace
labelGroup.Status.ActiveContainerIds[containerId] = newValue
delete(metricValues, containerId)
} else {
Expand Down

0 comments on commit 6ef6f12

Please sign in to comment.