From ee80432ff8eb4176a49b84f1104761e82bf10eb7 Mon Sep 17 00:00:00 2001 From: sdong Date: Mon, 20 Jul 2015 11:52:39 -0700 Subject: [PATCH] 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 --- db/db_bench.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/db/db_bench.cc b/db/db_bench.cc index b69b3d1fb..9c0b15600 100644 --- a/db/db_bench.cc +++ b/db/db_bench.cc @@ -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; }