|
|
@@ -307,7 +307,7 @@ func (cm *CostModel) ComputeAllocation(start, end time.Time, resolution time.Dur
|
|
|
applyRAMBytesRequested(podMap, resRAMRequests)
|
|
|
applyRAMBytesUsedAvg(podMap, resRAMUsageAvg)
|
|
|
applyRAMBytesUsedMax(podMap, resRAMUsageMax)
|
|
|
- applyGPUsRequested(podMap, resGPUsRequested, resGPUsAllocated)
|
|
|
+ applyGPUsAllocated(podMap, resGPUsRequested, resGPUsAllocated)
|
|
|
applyNetworkTotals(podMap, resNetTransferBytes, resNetReceiveBytes)
|
|
|
applyNetworkAllocation(podMap, resNetZoneGiB, resNetZoneCostPerGiB)
|
|
|
applyNetworkAllocation(podMap, resNetRegionGiB, resNetRegionCostPerGiB)
|
|
|
@@ -895,7 +895,7 @@ func applyRAMBytesUsedMax(podMap map[podKey]*Pod, resRAMBytesUsedMax []*prom.Que
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-func applyGPUsRequested(podMap map[podKey]*Pod, resGPUsRequested []*prom.QueryResult, resGPUsAllocated []*prom.QueryResult) {
|
|
|
+func applyGPUsAllocated(podMap map[podKey]*Pod, resGPUsRequested []*prom.QueryResult, resGPUsAllocated []*prom.QueryResult) {
|
|
|
if len(resGPUsAllocated) > 0 { // Use the new query, when it's become available in a window
|
|
|
resGPUsRequested = resGPUsAllocated
|
|
|
}
|