From e1951b6f28cc9dc3ec92fcc1546815c20ac2e760 Mon Sep 17 00:00:00 2001 From: Islam AbdelRahman Date: Mon, 9 May 2016 12:09:05 -0700 Subject: [PATCH] Add --index_block_restart_interval option in db_bench Summary: Pass --index_block_restart_interval flag to block_based_options in db_bench tool. Test Plan: none Reviewers: sdong, kradhakrishnan Reviewed By: kradhakrishnan Subscribers: andrewkr, dhruba Differential Revision: https://reviews.facebook.net/D57699 --- tools/db_bench_tool.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/db_bench_tool.cc b/tools/db_bench_tool.cc index 52d572c12..15e4508f0 100644 --- a/tools/db_bench_tool.cc +++ b/tools/db_bench_tool.cc @@ -350,7 +350,12 @@ DEFINE_int32(block_size, DEFINE_int32(block_restart_interval, rocksdb::BlockBasedTableOptions().block_restart_interval, "Number of keys between restart points " - "for delta encoding of keys."); + "for delta encoding of keys in data block."); + +DEFINE_int32(index_block_restart_interval, + rocksdb::BlockBasedTableOptions().index_block_restart_interval, + "Number of keys between restart points " + "for delta encoding of keys in index block."); DEFINE_int64(compressed_cache_size, -1, "Number of bytes to use as a cache of compressed data."); @@ -2541,6 +2546,8 @@ class Benchmark { block_based_options.block_cache_compressed = compressed_cache_; block_based_options.block_size = FLAGS_block_size; block_based_options.block_restart_interval = FLAGS_block_restart_interval; + block_based_options.index_block_restart_interval = + FLAGS_index_block_restart_interval; block_based_options.filter_policy = filter_policy_; block_based_options.skip_table_builder_flush = FLAGS_skip_table_builder_flush;