Formatting fixes in db_bench_tool (#5525)

Summary:
Formatting fixes in db_bench_tool that were accidentally omitted
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5525

Test Plan: Unit tests

Differential Revision: D16078516

Pulled By: elipoz

fbshipit-source-id: bf8df0e3f08092a91794ebf285396d9b8a335bb9
main
Eli Pozniansky 6 years ago committed by Facebook Github Bot
parent 1e87f2b68b
commit 3e6c185381
  1. 24
      tools/db_bench_tool.cc

@ -2397,8 +2397,8 @@ class Benchmark {
return nullptr; return nullptr;
} }
if (FLAGS_use_clock_cache) { if (FLAGS_use_clock_cache) {
auto cache = auto cache = NewClockCache(static_cast<size_t>(capacity),
NewClockCache(static_cast<size_t>(capacity), FLAGS_cache_numshardbits); FLAGS_cache_numshardbits);
if (!cache) { if (!cache) {
fprintf(stderr, "Clock cache not supported."); fprintf(stderr, "Clock cache not supported.");
exit(1); exit(1);
@ -2406,10 +2406,8 @@ class Benchmark {
return cache; return cache;
} else { } else {
return NewLRUCache( return NewLRUCache(
static_cast<size_t>(capacity), static_cast<size_t>(capacity), FLAGS_cache_numshardbits,
FLAGS_cache_numshardbits, false /*strict_capacity_limit*/, FLAGS_cache_high_pri_pool_ratio);
false /*strict_capacity_limit*/,
FLAGS_cache_high_pri_pool_ratio);
} }
} }
@ -3608,11 +3606,9 @@ class Benchmark {
if (FLAGS_max_bytes_for_level_multiplier_additional_v.size() > 0) { if (FLAGS_max_bytes_for_level_multiplier_additional_v.size() > 0) {
if (FLAGS_max_bytes_for_level_multiplier_additional_v.size() != if (FLAGS_max_bytes_for_level_multiplier_additional_v.size() !=
static_cast<unsigned int>(FLAGS_num_levels)) { static_cast<unsigned int>(FLAGS_num_levels)) {
fprintf( fprintf(stderr, "Insufficient number of fanouts specified %d\n",
stderr, static_cast<int>(
"Insufficient number of fanouts specified %d\n", FLAGS_max_bytes_for_level_multiplier_additional_v.size()));
static_cast<int>(
FLAGS_max_bytes_for_level_multiplier_additional_v.size()));
exit(1); exit(1);
} }
options.max_bytes_for_level_multiplier_additional = options.max_bytes_for_level_multiplier_additional =
@ -5168,9 +5164,9 @@ class Benchmark {
options.iterate_lower_bound = &lower_bound; options.iterate_lower_bound = &lower_bound;
} else { } else {
auto min_num = auto min_num =
std::min(FLAGS_num, seek_pos + FLAGS_max_scan_distance); std::min(FLAGS_num, seek_pos + FLAGS_max_scan_distance);
GenerateKeyFromInt( GenerateKeyFromInt(static_cast<uint64_t>(min_num), FLAGS_num,
static_cast<uint64_t>(min_num), FLAGS_num, &upper_bound); &upper_bound);
options.iterate_upper_bound = &upper_bound; options.iterate_upper_bound = &upper_bound;
} }
} }

Loading…
Cancel
Save