// GetResourceUtilizationRatio takes in a set of metrics, a set of matching requests, // and a target utilization percentage, and calculates the ratio of // desired to actual utilization (returning that, the actual utilization, and the raw average value) func GetResourceUtilizationRatio(metrics PodMetricsInfo, requests map[string]int64, targetUtilization int32) (utilizationRatio float64, currentUtilization int32, rawAverageValue int64, err error) { … } // GetMetricUsageRatio takes in a set of metrics and a target usage value, // and calculates the ratio of desired to actual usage // (returning that and the actual usage) func GetMetricUsageRatio(metrics PodMetricsInfo, targetUsage int64) (usageRatio float64, currentUsage int64) { … }