MCPcopy Create free account
hub / github.com/bytedance/terarkdb / computeCapacityHint

Method computeCapacityHint

java/src/main/java/org/rocksdb/RocksDB.java:1428–1432  ·  view source on GitHub ↗
(final int estimatedNumberOfItems)

Source from the content-addressed store, hash-verified

1426 }
1427
1428 private static int computeCapacityHint(final int estimatedNumberOfItems) {
1429 // Default load factor for HashMap is 0.75, so N * 1.5 will be at the load
1430 // limit. We add +1 for a buffer.
1431 return (int)Math.ceil(estimatedNumberOfItems * 1.5 + 1.0);
1432 }
1433
1434 /**
1435 * Returns a map of keys for which values were found in DB.

Callers 1

multiGetMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected