@@ -72,14 +72,14 @@ func HighestDynamicResourceUtilization(nodeInfo *framework.NodeInfo) (v1.Resourc
7272}
7373
7474func calculatePoolUtil (unallocated , allocated []resourceapi.Device , resourceSlices []* resourceapi.ResourceSlice ) float64 {
75- TotalConsumedCounters := map [string ]map [string ]resource.Quantity {}
75+ totalConsumedCounters := map [string ]map [string ]resource.Quantity {}
7676 for _ , resourceSlice := range resourceSlices {
7777 for _ , sharedCounter := range resourceSlice .Spec .SharedCounters {
78- if _ , ok := TotalConsumedCounters [sharedCounter .Name ]; ! ok {
79- TotalConsumedCounters [sharedCounter .Name ] = map [string ]resource.Quantity {}
78+ if _ , ok := totalConsumedCounters [sharedCounter .Name ]; ! ok {
79+ totalConsumedCounters [sharedCounter .Name ] = map [string ]resource.Quantity {}
8080 }
8181 for counter , value := range sharedCounter .Counters {
82- TotalConsumedCounters [sharedCounter.Name ][counter ] = value .Value
82+ totalConsumedCounters [sharedCounter.Name ][counter ] = value .Value
8383 }
8484 }
8585 }
@@ -107,10 +107,10 @@ func calculatePoolUtil(unallocated, allocated []resourceapi.Device, resourceSlic
107107 if devicesWithoutCounters != 0 {
108108 atomicDevicesUtilization = float64 (allocatedDevicesWithoutCounters ) / float64 (devicesWithoutCounters )
109109 }
110- if len (TotalConsumedCounters ) == 0 {
110+ if len (totalConsumedCounters ) == 0 {
111111 return atomicDevicesUtilization
112112 }
113- for counterSet , counters := range TotalConsumedCounters {
113+ for counterSet , counters := range totalConsumedCounters {
114114 for counterName , totalValue := range counters {
115115 if totalValue .IsZero () {
116116 continue
0 commit comments