Fix db_bench duration for multireadrandom benchmark (#7817)

Summary:
The multireadrandom benchmark, when run for a specific number of reads (--reads argument), should base the duration on the actual number of keys read rather than number of batches.

Tests:
Run db_bench multireadrandom benchmark

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

Reviewed By: zhichao-cao

Differential Revision: D25717230

Pulled By: anand1976

fbshipit-source-id: 13f4d8162268cf9a34918655e60302d0aba3864b
main
anand76 4 years ago committed by Facebook GitHub Bot
parent 736c6dc59f
commit d7738666b0
  1. 2
      tools/db_bench_tool.cc

@ -5220,7 +5220,7 @@ class Benchmark {
}
Duration duration(FLAGS_duration, reads_);
while (!duration.Done(1)) {
while (!duration.Done(entries_per_batch_)) {
DB* db = SelectDB(thread);
if (FLAGS_multiread_stride) {
int64_t key = GetRandomKey(&thread->rand);

Loading…
Cancel
Save