Forráskód Böngészése

Cleanup

Signed-off-by: thomasvn <thomasnguyen96@gmail.com>
thomasvn 2 éve
szülő
commit
aad39ed7cd
2 módosított fájl, 1 hozzáadás és 5 törlés
  1. 0 1
      pkg/costmodel/allocation.go
  2. 1 4
      pkg/costmodel/allocation_helpers.go

+ 0 - 1
pkg/costmodel/allocation.go

@@ -430,7 +430,6 @@ func (cm *CostModel) computeAllocation(start, end time.Time, resolution time.Dur
 	resChGPUsRequested := ctx.QueryAtTime(queryGPUsRequested, end)
 
 	queryGPUsUsageAvg := fmt.Sprintf(queryFmtGPUsUsageAvg, durStr, env.GetPromClusterLabel())
-	log.Infof("THOMAS: queryGPUsUsageAvg: %s", queryGPUsUsageAvg)
 	resChGPUsUsageAvg := ctx.Query(queryGPUsUsageAvg)
 
 	queryGPUsAllocated := fmt.Sprintf(queryFmtGPUsAllocated, env.GetPromClusterFilter(), durStr, env.GetPromClusterLabel())

+ 1 - 4
pkg/costmodel/allocation_helpers.go

@@ -614,12 +614,9 @@ func applyRAMBytesUsedMax(podMap map[podKey]*pod, resRAMBytesUsedMax []*prom.Que
 	}
 }
 
-// Example PromQueryResult: DCGM_FI_DEV_GPU_UTIL{gpu="0",UUID="GPU-d63da75b-f5a3-de2e-67bd-a72803ded604",device="nvidia0",modelName="Tesla V100-SXM2-16GB",Hostname="ip-192-168-5-95.us-east-2.compute.internal",DCGM_FI_DRIVER_VERSION="535.161.08",container="dcgmproftester12",namespace="kubecost",pod="dcgmproftester2"} 99
 func applyGPUUsageAvg(podMap map[podKey]*pod, resGPUUsageAvg []*prom.QueryResult, podUIDKeyMap map[podKey][]podKey) {
+	// Example PromQueryResult: {container="dcgmproftester12", namespace="gpu", pod="dcgmproftester3-deployment-fc89c8dd6-ph7z5"} 99
 	for _, res := range resGPUUsageAvg {
-
-		log.Infof("THOMAS: applyGPUUsageAvg result: %v: %v", res.Metric, res.Values[0].Value)
-
 		key, err := resultPodKey(res, env.GetPromClusterLabel(), "namespace")
 		if err != nil {
 			log.DedupedWarningf(10, "CostModel.ComputeAllocation: GPU usage avg result missing field: %s", err)