Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for getContainerUsageNanoCores (0.19 sec)

  1. pkg/kubelet/stats/cri_stats_provider.go

    		result.Memory.WorkingSetBytes = uint64Ptr(0)
    	}
    
    	return result
    }
    
    // getContainerUsageNanoCores first attempts to get the usage nano cores from the stats reported
    // by the CRI. If it is unable to, it gets the information from the cache instead.
    func (p *criStatsProvider) getContainerUsageNanoCores(stats *runtimeapi.ContainerStats) *uint64 {
    	if stats == nil || stats.Attributes == nil {
    		return nil
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 01 18:46:33 UTC 2023
    - 35.1K bytes
    - Viewed (0)
  2. pkg/kubelet/stats/cri_stats_provider_test.go

    		cached := provider.getContainerUsageNanoCores(test.stats)
    		assert.Nil(t, cached)
    
    		// Update the cache and get the latest value.
    		real := provider.getAndUpdateContainerUsageNanoCores(test.stats)
    		assert.Equal(t, test.expected, real, test.desc)
    
    		// After the update, the cached value should be up-to-date
    		cached = provider.getContainerUsageNanoCores(test.stats)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 54.5K bytes
    - Viewed (0)
Back to top