Przeglądaj źródła

Remove profiling logs

Niko Kovacevic 5 lat temu
rodzic
commit
3ad1533002
1 zmienionych plików z 0 dodań i 8 usunięć
  1. 0 8
      pkg/costmodel/allocation.go

+ 0 - 8
pkg/costmodel/allocation.go

@@ -101,7 +101,6 @@ func (cm *CostModel) ComputeAllocation(start, end time.Time, resolution time.Dur
 	resStr := util.DurationString(resolution)
 
 	ctx := prom.NewContext(cm.PrometheusClient)
-	startQuerying := time.Now()
 
 	queryRAMBytesAllocated := fmt.Sprintf(queryFmtRAMBytesAllocated, durStr, offStr)
 	resChRAMBytesAllocated := ctx.Query(queryRAMBytesAllocated)
@@ -233,8 +232,6 @@ func (cm *CostModel) ComputeAllocation(start, end time.Time, resolution time.Dur
 	resDaemonSetLabels, _ := resChDaemonSetLabels.Await()
 	resJobLabels, _ := resChJobLabels.Await()
 
-	log.Profile(startQuerying, "CostModel.ComputeAllocation: queries complete")
-
 	if ctx.HasErrors() {
 		for _, err := range ctx.Errors() {
 			log.Errorf("CostModel.ComputeAllocation: %s", err)
@@ -243,8 +240,6 @@ func (cm *CostModel) ComputeAllocation(start, end time.Time, resolution time.Dur
 		return allocSet, ctx.ErrorCollection()
 	}
 
-	defer log.Profile(time.Now(), "CostModel.ComputeAllocation: processing complete")
-
 	applyCPUCoresAllocated(podMap, resCPUCoresAllocated)
 	applyCPUCoresRequested(podMap, resCPURequests)
 	applyCPUCoresUsed(podMap, resCPUUsage)
@@ -379,7 +374,6 @@ func (cm *CostModel) buildPodMap(window kubecost.Window, resolution, maxBatchSiz
 	resStr := util.DurationString(resolution)
 
 	ctx := prom.NewContext(cm.PrometheusClient)
-	profile := time.Now()
 
 	// Query for (start, end) by (pod, namespace, cluster) over the given
 	// window, using the given resolution, and if necessary in batches no
@@ -436,8 +430,6 @@ func (cm *CostModel) buildPodMap(window kubecost.Window, resolution, maxBatchSiz
 		numQuery++
 	}
 
-	log.Profile(profile, "CostModel.ComputeAllocation: pod map built")
-
 	return nil
 }