db_bench add an option of --universal_allow_trivial_move

Summary: Now we allow trivial move in universal compaction. Add a parameter in db_bench

Test Plan: Run db_bench with this option on and off and make sure the option is switched correctly.

Reviewers: yhchiang, igor, kradhakrishnan, anthony

Reviewed By: anthony

Subscribers: leveldb, dhruba

Differential Revision: https://reviews.facebook.net/D41427
This commit is contained in:
sdong 2015-07-20 11:52:39 -07:00
parent 58b4209e05
commit ee80432ff8

View File

@ -311,6 +311,9 @@ DEFINE_int32(universal_compression_size_percent, -1,
"The percentage of the database to compress for universal "
"compaction. -1 means compress everything.");
DEFINE_bool(universal_allow_trivial_move, false,
"Sllow trivial move in universal compaction.");
DEFINE_int64(cache_size, -1, "Number of bytes to use as a cache of uncompressed"
"data. Negative means use default settings.");
@ -2473,6 +2476,8 @@ class Benchmark {
options.compaction_options_universal.compression_size_percent =
FLAGS_universal_compression_size_percent;
}
options.compaction_options_universal.allow_trivial_move =
FLAGS_universal_allow_trivial_move;
if (FLAGS_thread_status_per_interval > 0) {
options.enable_thread_tracking = true;
}