Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for indexLength (0.11 sec)

  1. pilot/pkg/model/typed_xds_cache_test.go

    	cache := c.(*lruCache[uint64])
    
    	assert.Equal(t, cache.store.Len(), 0)
    	assert.Equal(t, cache.indexLength(), 0)
    
    	// adding the entry populates the indexes
    	c.Add(firstEntry.Key(), firstEntry, req, res)
    
    	assert.Equal(t, cache.store.Len(), 1)
    	assert.Equal(t, cache.indexLength(), 2)
    	assert.Equal(t, cache.configIndexSnapshot(), map[ConfigHash]sets.Set[uint64]{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jan 29 20:35:31 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  2. pilot/pkg/model/typed_xds_cache.go

    	for i, ik := range iKeys {
    		v, ok := l.store.Get(ik)
    		if !ok {
    			continue
    		}
    
    		res[i] = v.value
    	}
    	return res
    }
    
    func (l *lruCache[K]) indexLength() int {
    	l.mu.RLock()
    	defer l.mu.RUnlock()
    	return len(l.configIndex)
    }
    
    func (l *lruCache[K]) configIndexSnapshot() map[ConfigHash]sets.Set[K] {
    	l.mu.RLock()
    	defer l.mu.RUnlock()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Mar 30 05:26:03 UTC 2024
    - 11K bytes
    - Viewed (0)
Back to top