Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for usageRatio (0.1 sec)

  1. pkg/controller/podautoscaler/metrics/utilization.go

    // 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) {
    	metricsTotal := int64(0)
    	for _, metric := range metrics {
    		metricsTotal += metric.Value
    	}
    
    	currentUsage = metricsTotal / int64(len(metrics))
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Sep 22 08:59:02 UTC 2022
    - 2.3K bytes
    - Viewed (0)
Back to top