MCPcopy Create free account
hub / github.com/cortexproject/cortex / ShuffleShardExpectedInstances

Function ShuffleShardExpectedInstances

pkg/util/shard.go:47–49  ·  view source on GitHub ↗

ShuffleShardExpectedInstances returns the total number of instances that should be selected for a given tenant. If zone-aware replication is disabled, the input numZones should be 1.

(shardSize, numZones int)

Source from the content-addressed store, hash-verified

45// ShuffleShardExpectedInstances returns the total number of instances that should be selected for a given
46// tenant. If zone-aware replication is disabled, the input numZones should be 1.
47func ShuffleShardExpectedInstances(shardSize, numZones int) int {
48 return ShuffleShardExpectedInstancesPerZone(shardSize, numZones) * numZones
49}
50
51// DynamicShardSize returns the shard size as a percentage of numInstances if the value is < 1. If the value is >= 1, the value is rounded and returned.
52func DynamicShardSize(value float64, numInstances int) int {

Callers 2

Tested by 1