瀏覽代碼

Add clarification comment

Kaelan Patel 4 年之前
父節點
當前提交
0d3d64a1fc
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      pkg/costmodel/allocation.go

+ 2 - 0
pkg/costmodel/allocation.go

@@ -986,6 +986,8 @@ func applyGPUUsageAvg(podMap map[podKey]*Pod, resGPUUsageAvg []*prom.QueryResult
 			pod.AppendContainer(container)
 			pod.AppendContainer(container)
 		}
 		}
 
 
+		// Metric represents percentages as full numbers, so scale down by factor of 100 to make consistent
+		// with other efficiency fields
 		pod.Allocations[container].GPUUsageAverage = res.Values[0].Value * 0.01
 		pod.Allocations[container].GPUUsageAverage = res.Values[0].Value * 0.01
 	}
 	}
 }
 }