Added logging when there is no victim left to cap.
This commit is contained in:
parent
9eab5db2ea
commit
87bd8d7cf0
1 changed files with 5 additions and 0 deletions
|
@ -170,6 +170,7 @@ func StartPCPLogAndProgressiveExtremaCap(quit chan struct{}, logging *bool, pref
|
||||||
}
|
}
|
||||||
// If no new victim found, then we need to cap the best victim among the ones that are already capped
|
// If no new victim found, then we need to cap the best victim among the ones that are already capped
|
||||||
if !newVictimFound {
|
if !newVictimFound {
|
||||||
|
canCapAlreadyCappedVictim := false
|
||||||
for i := 0; i < len(alreadyCappedHosts); i++ {
|
for i := 0; i < len(alreadyCappedHosts); i++ {
|
||||||
// If already capped then the host must be present in orderCappedVictims
|
// If already capped then the host must be present in orderCappedVictims
|
||||||
capValue := orderCappedVictims[alreadyCappedHosts[i]]
|
capValue := orderCappedVictims[alreadyCappedHosts[i]]
|
||||||
|
@ -192,6 +193,7 @@ func StartPCPLogAndProgressiveExtremaCap(quit chan struct{}, logging *bool, pref
|
||||||
cappedVictims[alreadyCappedHosts[i]] = newCapValue
|
cappedVictims[alreadyCappedHosts[i]] = newCapValue
|
||||||
orderCappedVictims[alreadyCappedHosts[i]] = newCapValue
|
orderCappedVictims[alreadyCappedHosts[i]] = newCapValue
|
||||||
}
|
}
|
||||||
|
canCapAlreadyCappedVictim = true
|
||||||
break // Breaking only on successful cap.
|
break // Breaking only on successful cap.
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -200,6 +202,9 @@ func StartPCPLogAndProgressiveExtremaCap(quit chan struct{}, logging *bool, pref
|
||||||
// If cannot find any victim, then all nodes have been capped to the maximum and we stop capping at this point.
|
// If cannot find any victim, then all nodes have been capped to the maximum and we stop capping at this point.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!canCapAlreadyCappedVictim) {
|
||||||
|
log.Println("No Victim left to cap.")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if clusterMean < loThreshold {
|
} else if clusterMean < loThreshold {
|
||||||
|
|
Reference in a new issue