mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-27 02:44:18 +00:00
d1aaaf718c
Summary: There is an existing field Options.max_bytes_for_level_multiplier that sets the multiplier for the size of each level in the database. This patch introduces the ability to set different multipliers for every level in the database. The size of a level is determined by using both max_bytes_for_level_multiplier as well as the per-level fanout. size of level[i] = size of level[i-1] * max_bytes_for_level_multiplier * fanout[i-1] The default value of fanout is 1, so that it is backward compatible. Test Plan: make check Reviewers: haobo, emayanke Reviewed By: emayanke CC: leveldb Differential Revision: https://reviews.facebook.net/D10863
24 lines
401 B
C++
24 lines
401 B
C++
// Copyright (c) 2013 Facebook.
|
|
|
|
#include <sstream>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace leveldb {
|
|
|
|
using namespace std;
|
|
using std::string;
|
|
using std::vector;
|
|
using std::stringstream;
|
|
|
|
vector<string> stringSplit(string arg, char delim) {
|
|
vector<string> splits;
|
|
stringstream ss(arg);
|
|
string item;
|
|
while(getline(ss, item, delim)) {
|
|
splits.push_back(item);
|
|
}
|
|
return splits;
|
|
}
|
|
}
|