Add options.manual_wal_flush to db_bench (#9132)

Summary:
It is useful to add options.manual_wal_flush to db_bench

Pull Request resolved: https://github.com/facebook/rocksdb/pull/9132

Test Plan: Run the benchamrk with the option.

Reviewed By: ltamasi

Differential Revision: D32188060

fbshipit-source-id: a70835d3cad0f30095218dfda1daff0a432892e5
This commit is contained in:
sdong 2021-11-04 16:02:17 -07:00 committed by Facebook GitHub Bot
parent 8be121bb80
commit caadf09d53

View File

@ -759,6 +759,9 @@ DEFINE_bool(use_fsync, false, "If true, issue fsync instead of fdatasync");
DEFINE_bool(disable_wal, false, "If true, do not write WAL for write."); DEFINE_bool(disable_wal, false, "If true, do not write WAL for write.");
DEFINE_bool(manual_wal_flush, false,
"If true, buffer WAL until buffer is full or a manual FlushWAL().");
DEFINE_string(wal_dir, "", "If not empty, use the given dir for WAL"); DEFINE_string(wal_dir, "", "If not empty, use the given dir for WAL");
DEFINE_string(truth_db, "/dev/shm/truth_db/dbbench", DEFINE_string(truth_db, "/dev/shm/truth_db/dbbench",
@ -3975,6 +3978,7 @@ class Benchmark {
options.use_direct_reads = FLAGS_use_direct_reads; options.use_direct_reads = FLAGS_use_direct_reads;
options.use_direct_io_for_flush_and_compaction = options.use_direct_io_for_flush_and_compaction =
FLAGS_use_direct_io_for_flush_and_compaction; FLAGS_use_direct_io_for_flush_and_compaction;
options.manual_wal_flush = FLAGS_manual_wal_flush;
#ifndef ROCKSDB_LITE #ifndef ROCKSDB_LITE
options.ttl = FLAGS_fifo_compaction_ttl; options.ttl = FLAGS_fifo_compaction_ttl;
options.compaction_options_fifo = CompactionOptionsFIFO( options.compaction_options_fifo = CompactionOptionsFIFO(