MCPcopy Create free account
hub / github.com/baidu/tera / MaxFileSizeForLevel

Function MaxFileSizeForLevel

src/leveldb/db/version_set.cc:56–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56static uint64_t MaxFileSizeForLevel(int level, int64_t target_file_size) {
57 if (level == 2) {
58 return 2 * target_file_size;
59 } else if (level > 2) {
60 return 8 * target_file_size;
61 }
62 return target_file_size; // We could vary per level to reduce number of
63 // files?
64}
65
66static int64_t TotalFileSize(const std::vector<FileMetaData*>& files) {
67 int64_t sum = 0;

Callers 2

PickCompactionMethod · 0.85
CompactRangeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected