diff --git a/tools/db_bench_tool.cc b/tools/db_bench_tool.cc index 062554632..314a77809 100644 --- a/tools/db_bench_tool.cc +++ b/tools/db_bench_tool.cc @@ -3498,6 +3498,11 @@ class Benchmark { fprintf(stderr, "entries_per_batch = %" PRIi64 "\n", entries_per_batch_); method = &Benchmark::MultiReadRandom; + } else if (name == "multireadwhilewriting") { + fprintf(stderr, "entries_per_batch = %" PRIi64 "\n", + entries_per_batch_); + num_threads++; + method = &Benchmark::MultiReadWhileWriting; } else if (name == "approximatesizerandom") { fprintf(stderr, "entries_per_batch = %" PRIi64 "\n", entries_per_batch_); @@ -6895,6 +6900,14 @@ class Benchmark { } } + void MultiReadWhileWriting(ThreadState* thread) { + if (thread->tid > 0) { + MultiReadRandom(thread); + } else { + BGWriter(thread, kWrite); + } + } + void ReadWhileMerging(ThreadState* thread) { if (thread->tid > 0) { ReadRandom(thread);