Changed the loop as the Hosts is now a map and not a list and now looping over the keys is required.

This commit is contained in:
Abhishek Jain 2017-03-23 22:03:03 -04:00
parent 9365c2e51d
commit b311ee81f5

View file

@ -110,7 +110,7 @@ func (capper ClusterwideCapper) CleverRecap(totalPower map[string]float64,
wattsUsages := make(map[string][]float64) wattsUsages := make(map[string][]float64)
hostOfFinishedTask := "" hostOfFinishedTask := ""
indexOfFinishedTask := -1 indexOfFinishedTask := -1
for _, host := range constants.Hosts { for host, _ := range constants.Hosts {
wattsUsages[host] = []float64{0.0} wattsUsages[host] = []float64{0.0}
} }
for host, tasks := range taskMonitor { for host, tasks := range taskMonitor {