@@ -122,6 +122,9 @@ static int FLAGS_cache_size = -1;
122122// Maximum number of files to keep open at the same time (use default if == 0)
123123static int FLAGS_open_files = 0 ;
124124
125+ // Amount of data per block (initialized to default value by "main")
126+ static int FLAGS_block_size = 0 ;
127+
125128// Number of next operations to do in a ScanRandom workload
126129static int FLAGS_num_next = 1 ;
127130
@@ -1191,6 +1194,7 @@ class Benchmark {
11911194 options.block_cache = cache_;
11921195 options.write_buffer_size = FLAGS_write_buffer_size;
11931196 options.max_open_files = FLAGS_open_files;
1197+ options.block_size = FLAGS_block_size;
11941198 options.filter_policy = filter_policy_;
11951199 Status s = DB::Open (options, FLAGS_db, &db_);
11961200 if (!s.ok ()) {
@@ -1582,7 +1586,7 @@ class Benchmark {
15821586int main (int argc, char ** argv) {
15831587 FLAGS_write_buffer_size = leveldb::Options ().write_buffer_size ;
15841588 FLAGS_open_files = leveldb::Options ().max_open_files ;
1585- FLAGS_open_files = 1000 ;
1589+ FLAGS_block_size = leveldb::Options (). block_size ;
15861590 std::string default_db_path;
15871591
15881592 for (int i = 1 ; i < argc; i++) {
@@ -1615,6 +1619,8 @@ int main(int argc, char** argv) {
16151619 FLAGS_write_buffer_size = n;
16161620 } else if (sscanf (argv[i], " --cache_size=%d%c" , &n, &junk) == 1 ) {
16171621 FLAGS_cache_size = n;
1622+ } else if (sscanf (argv[i], " --block_size=%d%c" , &n, &junk) == 1 ) {
1623+ FLAGS_block_size = n;
16181624 } else if (sscanf (argv[i], " --bloom_bits=%d%c" , &n, &junk) == 1 ) {
16191625 FLAGS_bloom_bits = n;
16201626 } else if (sscanf (argv[i], " --open_files=%d%c" , &n, &junk) == 1 ) {
0 commit comments