|
@@ -90,7 +90,6 @@ func ComputeIdleCoefficient(costData map[string]*CostData, cli prometheusClient.
|
|
|
totalClusterCostOverWindow := (totalClusterCost / 730) * windowDuration.Hours() * (1 - discount)
|
|
totalClusterCostOverWindow := (totalClusterCost / 730) * windowDuration.Hours() * (1 - discount)
|
|
|
totalContainerCost := 0.0
|
|
totalContainerCost := 0.0
|
|
|
for _, costDatum := range costData {
|
|
for _, costDatum := range costData {
|
|
|
- // TODO does this need to be parametrized by rate when a rate is set?
|
|
|
|
|
cpuv, ramv, gpuv, pvvs, netv := getPriceVectors(cp, costDatum, "", discount, 1)
|
|
cpuv, ramv, gpuv, pvvs, netv := getPriceVectors(cp, costDatum, "", discount, 1)
|
|
|
totalContainerCost += totalVector(cpuv)
|
|
totalContainerCost += totalVector(cpuv)
|
|
|
totalContainerCost += totalVector(ramv)
|
|
totalContainerCost += totalVector(ramv)
|
|
@@ -198,9 +197,6 @@ func aggregateDatum(cp cloud.Provider, aggregations map[string]*Aggregation, cos
|
|
|
aggregations[key] = agg
|
|
aggregations[key] = agg
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // TODO nikovacevic-caching
|
|
|
|
|
- // costDatum.NetworkData appears to be a Vector where index 0 stores all the network data (see costmodel.ComputeCostData)
|
|
|
|
|
-
|
|
|
|
|
mergeVectors(cp, costDatum, aggregations[key], rate, discount, idleCoefficient)
|
|
mergeVectors(cp, costDatum, aggregations[key], rate, discount, idleCoefficient)
|
|
|
}
|
|
}
|
|
|
|
|
|