Просмотр исходного кода

Update comment and confirm that CPUUsed should not be normalized

Niko Kovacevic 6 лет назад
Родитель
Сommit
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
 	}