Add db_bench flag to set cache_index_and_filter_blocks
Summary: The new flag --cache_index_and_filter_blocks sets BlockBasedTableOptions.cache_index_and_filter_blocks Test Plan: make db_bench. Working on benchmarks with the new flag. Reviewers: igor Reviewed By: igor Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D41481
This commit is contained in:
parent
4bed00a44b
commit
1f4d565709
@ -310,6 +310,9 @@ DEFINE_int32(universal_compression_size_percent, -1,
|
|||||||
DEFINE_int64(cache_size, -1, "Number of bytes to use as a cache of uncompressed"
|
DEFINE_int64(cache_size, -1, "Number of bytes to use as a cache of uncompressed"
|
||||||
"data. Negative means use default settings.");
|
"data. Negative means use default settings.");
|
||||||
|
|
||||||
|
DEFINE_bool(cache_index_and_filter_blocks, false,
|
||||||
|
"Cache index/filter blocks in block cache.");
|
||||||
|
|
||||||
DEFINE_int32(block_size,
|
DEFINE_int32(block_size,
|
||||||
static_cast<int32_t>(rocksdb::BlockBasedTableOptions().block_size),
|
static_cast<int32_t>(rocksdb::BlockBasedTableOptions().block_size),
|
||||||
"Number of bytes in a block.");
|
"Number of bytes in a block.");
|
||||||
@ -2371,6 +2374,8 @@ class Benchmark {
|
|||||||
if (cache_ == nullptr) {
|
if (cache_ == nullptr) {
|
||||||
block_based_options.no_block_cache = true;
|
block_based_options.no_block_cache = true;
|
||||||
}
|
}
|
||||||
|
block_based_options.cache_index_and_filter_blocks =
|
||||||
|
FLAGS_cache_index_and_filter_blocks;
|
||||||
block_based_options.block_cache = cache_;
|
block_based_options.block_cache = cache_;
|
||||||
block_based_options.block_cache_compressed = compressed_cache_;
|
block_based_options.block_cache_compressed = compressed_cache_;
|
||||||
block_based_options.block_size = FLAGS_block_size;
|
block_based_options.block_size = FLAGS_block_size;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user