Misleading name for config
- Lenguaje dominante
- Go
- Estrellas
- 8.2k
- Forks
- 614
- Merge medio
- 5 d 12 h
- PR fusionados (30 d)
- 1
Descripción
`// initialShardSize computes initial shard size
func (c Config) initialShardSize() int {
return max(c.MaxEntriesInWindow/c.Shards, minimumEntriesInShard)
}
// maximumShardSize computes maximum shard size
func (c Config) maximumShardSize() int {
maxShardSize := 0
if c.HardMaxCacheSize > 0 {
maxShardSize = convertMBToBytes(c.HardMaxCacheSize) / c.Shards
}
return maxShardSize
}`
initialShardSize returns the number of entries in a shard while maximumShardSize returns the storage size of a shard which can be confirmed by the following usage
` entries: *queue.NewBytesQueue(config.initialShardSize()*config.MaxEntrySize, config.maximumShardSize(), config.Verbose),
`
config.MaxEntrySize is the storage size
If I didn't make it wrong I would suggest rename the functions as following:
initialShardSize -> initalEntriesNumsInSingleShards
"size" usually means the storage size and "number" usually means the count or number of something
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.