More small debug fixes for orborus

This commit is contained in:
Frikky
2023-10-22 20:41:20 +02:00
parent 025b2e15c3
commit 62a38b836e
+2 -2
View File
@@ -1090,7 +1090,7 @@ func getOrborusStats() shuffle.OrborusStats {
totalCPU := float64(0.0) totalCPU := float64(0.0)
memUsage := float64(0.0) memUsage := float64(0.0)
for result := range resultCh { for result := range resultCh {
fmt.Printf("[DEBUG] Container %s CPU utilization: %.2f%%, Memory utilization: %.2f%%\n", result.containerID, result.cpuUsage, result.memoryUsage) //fmt.Printf("[DEBUG] Container %s CPU utilization: %.2f%%, Memory utilization: %.2f%%\n", result.containerID, result.cpuUsage, result.memoryUsage)
// check if it's NaN or Inf // check if it's NaN or Inf
if !math.IsNaN(result.cpuUsage) { if !math.IsNaN(result.cpuUsage) {
@@ -1104,7 +1104,7 @@ func getOrborusStats() shuffle.OrborusStats {
newStats.CPUPercent = totalCPU newStats.CPUPercent = totalCPU
newStats.MemoryPercent = memUsage newStats.MemoryPercent = memUsage
log.Printf("[DEBUG] CPU: %.2f, Memory: %.2f", newStats.CPUPercent, newStats.MemoryPercent) //log.Printf("[DEBUG] CPU: %.2f, Memory: %.2f", newStats.CPUPercent, newStats.MemoryPercent)
/* /*
cpuPercent, err := cpu.Percent(250*time.Millisecond, false) cpuPercent, err := cpu.Percent(250*time.Millisecond, false)