db_bench: --dump_malloc_stats takes no effect

Summary:
Fix the bug that --dump_malloc_stats is set before opening the DB.
Closes https://github.com/facebook/rocksdb/pull/1447

Differential Revision: D4106001

Pulled By: siying

fbshipit-source-id: 4e746da
This commit is contained in:
Siying Dong 2016-10-31 14:50:40 -07:00 committed by Facebook Github Bot
parent 6a4faee5cd
commit f9eb56791a

View file

@ -2987,6 +2987,7 @@ class Benchmark {
options.statistics = dbstats;
options.wal_dir = FLAGS_wal_dir;
options.create_if_missing = !FLAGS_use_existing_db;
options.dump_malloc_stats = FLAGS_dump_malloc_stats;
if (FLAGS_row_cache_size) {
if (FLAGS_cache_numshardbits >= 1) {
@ -3032,7 +3033,6 @@ class Benchmark {
}
options.wal_dir = wal_dir;
}
options.dump_malloc_stats = FLAGS_dump_malloc_stats;
}
void Open(Options* opts) {