fix db_bench to use HashSkipList for real
Summary: For HashSkipList case, DBImpl has sanity check to see if prefix_extractor in options is the same as the one in memtable factory. If not, it falls back to SkipList. As result, I was experimenting with SkipList performance. No wonder it is much worse than LinkedList Test Plan: ran benchmark Reviewers: haobo, sdong, igor Reviewed By: igor CC: leveldb Differential Revision: https://reviews.facebook.net/D16569
This commit is contained in:
parent
51560ba755
commit
64138b5d9c
@ -1022,8 +1022,7 @@ class Benchmark {
|
||||
filter_policy_(FLAGS_bloom_bits >= 0
|
||||
? NewBloomFilterPolicy(FLAGS_bloom_bits)
|
||||
: nullptr),
|
||||
prefix_extractor_(NewFixedPrefixTransform(FLAGS_use_plain_table ?
|
||||
FLAGS_prefix_size : FLAGS_key_size-1)),
|
||||
prefix_extractor_(NewFixedPrefixTransform(FLAGS_prefix_size)),
|
||||
db_(nullptr),
|
||||
num_(FLAGS_num),
|
||||
value_size_(FLAGS_value_size),
|
||||
@ -1565,7 +1564,7 @@ class Benchmark {
|
||||
switch (FLAGS_rep_factory) {
|
||||
case kPrefixHash:
|
||||
options.memtable_factory.reset(NewHashSkipListRepFactory(
|
||||
NewFixedPrefixTransform(FLAGS_prefix_size),
|
||||
prefix_extractor_,
|
||||
FLAGS_hash_bucket_count));
|
||||
break;
|
||||
case kSkipList:
|
||||
@ -1573,7 +1572,7 @@ class Benchmark {
|
||||
break;
|
||||
case kHashLinkedList:
|
||||
options.memtable_factory.reset(NewHashLinkListRepFactory(
|
||||
NewFixedPrefixTransform(FLAGS_prefix_size),
|
||||
prefix_extractor_,
|
||||
FLAGS_hash_bucket_count));
|
||||
break;
|
||||
case kVectorRep:
|
||||
|
Loading…
x
Reference in New Issue
Block a user