From 182b4ceacdf80ce7922205edee4d673d0f1644de Mon Sep 17 00:00:00 2001 From: Mark Callaghan Date: Wed, 25 Feb 2015 15:53:45 -0800 Subject: [PATCH] Limit key range to number of keys, not number of writes Summary: An old commit (482401) changed DoWrite to use the value of --writes rather than --num to determine the range for keys. This restores the old and correct behavior which is to limit it using --num. Task ID: #6353043 Blame Rev: Test Plan: run db_bench Revert Plan: Database Impact: Memcache Impact: Other Notes: EImportant: - begin *PUBLIC* platform impact section - Bugzilla: # - end platform impact - Reviewers: igor Reviewed By: igor Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D34065 --- db/db_bench.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/db_bench.cc b/db/db_bench.cc index ae1b2af1d..c02871664 100644 --- a/db/db_bench.cc +++ b/db/db_bench.cc @@ -2266,7 +2266,7 @@ class Benchmark { Duration duration(test_duration, max_ops, ops_per_stage); for (size_t i = 0; i < num_key_gens; i++) { - key_gens[i].reset(new KeyGenerator(&(thread->rand), write_mode, num_ops, + key_gens[i].reset(new KeyGenerator(&(thread->rand), write_mode, num_, ops_per_stage)); } -- GitLab