Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for suggestedWatchChannelSize (0.42 sec)

  1. staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache.go

    	// used by the watch not using the index.
    	// TODO(wojtek-t): Figure out if the value shouldn't be higher.
    	maxWatchChanSizeWithoutIndex = 100
    )
    
    func (w *watchCache) suggestedWatchChannelSize(indexExists, triggerUsed bool) int {
    	// To estimate the channel size we use a heuristic that a channel
    	// should roughly be able to keep one second of history.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 11 10:20:57 UTC 2024
    - 26.2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_test.go

    		},
    	}
    
    	for _, test := range testCases {
    		t.Run(test.name, func(t *testing.T) {
    			store := newTestWatchCache(test.capacity, &cache.Indexers{})
    			defer store.Stop()
    			got := store.suggestedWatchChannelSize(test.indexExists, test.triggerUsed)
    			if got != test.expected {
    				t.Errorf("unexpected channel size got: %v, expected: %v", got, test.expected)
    			}
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 09:20:10 UTC 2024
    - 35.4K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go

    	//   a bunch of changes have enough buffer to avoid from blocking other
    	//   watchers on our watcher having a processing hiccup
    	chanSize := c.watchCache.suggestedWatchChannelSize(c.indexedTrigger != nil, triggerSupported)
    
    	// Determine the ResourceVersion to which the watch cache must be synchronized
    	requiredResourceVersion, err := c.getWatchCacheResourceVersion(ctx, requestedWatchRV, opts)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 51.8K bytes
    - Viewed (0)
Back to top