retrofitted schedulers by renaming 'taken' to 'offerTaken' for the boolean to indicate whether an offer has been consumed.
This commit is contained in:
parent
7fc5b5d19e
commit
eea0db0b3d
18 changed files with 54 additions and 54 deletions
|
@ -242,7 +242,7 @@ func (s *BPSWClassMapWattsPistonCapping) ResourceOffers(driver sched.SchedulerDr
|
|||
|
||||
offerCPU, offerRAM, offerWatts := offerUtils.OfferAgg(offer)
|
||||
|
||||
taken := false
|
||||
offerTaken := false
|
||||
totalWatts := 0.0
|
||||
totalCPU := 0.0
|
||||
totalRAM := 0.0
|
||||
|
@ -275,7 +275,7 @@ func (s *BPSWClassMapWattsPistonCapping) ResourceOffers(driver sched.SchedulerDr
|
|||
}
|
||||
|
||||
fmt.Println("Watts being used: ", task.ClassToWatts[powerClass])
|
||||
taken = true
|
||||
offerTaken = true
|
||||
totalWatts += task.ClassToWatts[powerClass]
|
||||
totalCPU += task.CPU
|
||||
totalRAM += task.RAM
|
||||
|
@ -303,7 +303,7 @@ func (s *BPSWClassMapWattsPistonCapping) ResourceOffers(driver sched.SchedulerDr
|
|||
}
|
||||
}
|
||||
|
||||
if taken {
|
||||
if offerTaken {
|
||||
// Updating the cap value for offer.Hostname
|
||||
bpswClassMapWattsPistonMutex.Lock()
|
||||
bpswClassMapWattsPistonCapValues[*offer.Hostname] += partialLoad
|
||||
|
|
Reference in a new issue