Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for latestContainerStats (0.63 sec)

  1. pkg/kubelet/stats/helper.go

    			swapStats.SwapAvailableBytes = &swapAvailableBytes
    		}
    	}
    
    	return swapStats
    }
    
    // latestContainerStats returns the latest container stats from cadvisor, or nil if none exist
    func latestContainerStats(info *cadvisorapiv2.ContainerInfo) (*cadvisorapiv2.ContainerStats, bool) {
    	stats := info.Stats
    	if len(stats) < 1 {
    		return nil, false
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 17 23:40:02 UTC 2023
    - 14.8K bytes
    - Viewed (0)
  2. pkg/kubelet/stats/cadvisor_stats_provider.go

    // false otherwise.
    func hasMemoryAndCPUInstUsage(info *cadvisorapiv2.ContainerInfo) bool {
    	if !info.Spec.HasCpu || !info.Spec.HasMemory {
    		return false
    	}
    	cstat, found := latestContainerStats(info)
    	if !found {
    		return false
    	}
    	if cstat.CpuInst == nil {
    		return false
    	}
    	return cstat.CpuInst.Usage.Total != 0 && cstat.Memory.RSS != 0
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Nov 16 13:34:22 UTC 2023
    - 18.9K bytes
    - Viewed (0)
Back to top