diff --git a/schedulers/pistoncapper.go b/schedulers/pistoncapper.go index 60f2a56..eea64cf 100644 --- a/schedulers/pistoncapper.go +++ b/schedulers/pistoncapper.go @@ -165,15 +165,17 @@ func (s *PistonCapper) startCapping() { if prevRoundedCap != roundedCapValue { if err := rapl.Cap(host, "rapl", roundedCapValue); err != nil { log.Println(err) + } else { + log.Printf("Capped [%s] at %d", host, int(math.Floor(capValue + 0.5))) } - log.Printf("Capped [%s] at %d", host, int(math.Floor(capValue + 0.5))) previousRoundedCapValues[host] = roundedCapValue } } else { if err := rapl.Cap(host, "rapl", roundedCapValue); err != nil { log.Println(err) + } else { + log.Printf("Capped [%s] at %d", host, int(math.Floor(capValue + 0.5))) } - log.Printf("Capped [%s] at %d", host, int(math.Floor(capValue + 0.5))) previousRoundedCapValues[host] = roundedCapValue } }