Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for getAndUpdateContainerUsageNanoCores (0.4 sec)

  1. pkg/kubelet/stats/cri_stats_provider.go

    	return &latestUsage
    }
    
    // getAndUpdateContainerUsageNanoCores first attempts to get the usage nano cores from the stats reported
    // by the CRI. If it is unable to, it computes usageNanoCores based on the given and the cached usageCoreNanoSeconds,
    // updates the cache with the computed usageNanoCores, and returns the usageNanoCores.
    func (p *criStatsProvider) getAndUpdateContainerUsageNanoCores(stats *runtimeapi.ContainerStats) *uint64 {
    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