aggregation.go 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package costmodel
  2. import (
  3. "github.com/kubecost/cost-model/pkg/kubecost"
  4. "github.com/kubecost/cost-model/pkg/util"
  5. )
  6. type Aggregation struct {
  7. Aggregator string `json:"aggregation"`
  8. Subfields []string `json:"subfields,omitempty"`
  9. Environment string `json:"environment"`
  10. Cluster string `json:"cluster,omitempty"`
  11. Properties *kubecost.Properties `json:"-"`
  12. CPUAllocationHourlyAverage float64 `json:"cpuAllocationAverage"`
  13. CPUAllocationVectors []*util.Vector `json:"-"`
  14. CPUAllocationTotal float64 `json:"-"`
  15. CPUCost float64 `json:"cpuCost"`
  16. CPUCostVector []*util.Vector `json:"cpuCostVector,omitempty"`
  17. CPUEfficiency float64 `json:"cpuEfficiency"`
  18. CPURequestedVectors []*util.Vector `json:"-"`
  19. CPUUsedVectors []*util.Vector `json:"-"`
  20. Efficiency float64 `json:"efficiency"`
  21. GPUAllocationHourlyAverage float64 `json:"gpuAllocationAverage"`
  22. GPUAllocationVectors []*util.Vector `json:"-"`
  23. GPUCost float64 `json:"gpuCost"`
  24. GPUCostVector []*util.Vector `json:"gpuCostVector,omitempty"`
  25. GPUAllocationTotal float64 `json:"-"`
  26. RAMAllocationHourlyAverage float64 `json:"ramAllocationAverage"`
  27. RAMAllocationVectors []*util.Vector `json:"-"`
  28. RAMAllocationTotal float64 `json:"-"`
  29. RAMCost float64 `json:"ramCost"`
  30. RAMCostVector []*util.Vector `json:"ramCostVector,omitempty"`
  31. RAMEfficiency float64 `json:"ramEfficiency"`
  32. RAMRequestedVectors []*util.Vector `json:"-"`
  33. RAMUsedVectors []*util.Vector `json:"-"`
  34. PVAllocationHourlyAverage float64 `json:"pvAllocationAverage"`
  35. PVAllocationVectors []*util.Vector `json:"-"`
  36. PVAllocationTotal float64 `json:"-"`
  37. PVCost float64 `json:"pvCost"`
  38. PVCostVector []*util.Vector `json:"pvCostVector,omitempty"`
  39. NetworkCost float64 `json:"networkCost"`
  40. NetworkCostVector []*util.Vector `json:"networkCostVector,omitempty"`
  41. SharedCost float64 `json:"sharedCost"`
  42. TotalCost float64 `json:"totalCost"`
  43. TotalCostVector []*util.Vector `json:"totalCostVector,omitempty"`
  44. }