Преглед на файлове

Update comment and confirm that CPUUsed should not be normalized

Niko Kovacevic преди 6 години
родител
ревизия
471ef720d3
променени са 1 файла, в които са добавени 2 реда и са изтрити 3 реда
  1. 2 3
      costmodel/costmodel.go

+ 2 - 3
costmodel/costmodel.go

@@ -1983,10 +1983,9 @@ func (cm *CostModel) costDataRange(cli prometheusClient.Client, clientset kubern
 		containers[key] = true
 	}
 
-	// No need to normalize here, as this comes from a counter
+	// No need to normalize here, as this comes from a counter, namely:
+	// rate(container_cpu_usage_seconds_total) which properly accounts for normalized rates
 	CPUUsedMap, err := GetContainerMetricVectors(resultCPUUsage, clusterID)
-	// TODO Is that ^ true? We were normalizing before (in spite of the comment) so I'm keeping it.
-	// CPUUsedMap, err := GetNormalizedContainerMetricVectors(resultCPUUsage, normalizationValue, clusterID)
 	if err != nil {
 		return nil, err
 	}