Misleading name for config
- 主要言語
- Go
- スター
- 8.2k
- フォーク
- 614
- 平均マージ
- 5日 12時間
- マージ済み PR(30日)
- 1
説明
`// 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
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。