Logging of capping happens only when there is no error with rapl.Cap.
This commit is contained in:
parent
d9357f59e7
commit
236be222cd
1 changed files with 4 additions and 2 deletions
|
@ -165,15 +165,17 @@ func (s *PistonCapper) startCapping() {
|
||||||
if prevRoundedCap != roundedCapValue {
|
if prevRoundedCap != roundedCapValue {
|
||||||
if err := rapl.Cap(host, "rapl", roundedCapValue); err != nil {
|
if err := rapl.Cap(host, "rapl", roundedCapValue); err != nil {
|
||||||
log.Println(err)
|
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
|
previousRoundedCapValues[host] = roundedCapValue
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if err := rapl.Cap(host, "rapl", roundedCapValue); err != nil {
|
if err := rapl.Cap(host, "rapl", roundedCapValue); err != nil {
|
||||||
log.Println(err)
|
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
|
previousRoundedCapValues[host] = roundedCapValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue