|
|
@ -79,6 +79,8 @@ static const char* FLAGS_benchmarks = |
|
|
|
"ReadSeqWhileDeleting," |
|
|
|
"ReadRandomWhileCreating," |
|
|
|
"ReadRandomWhileDeleting," |
|
|
|
"WriteRandomWithIndex," |
|
|
|
"WriteSeqWithIndex," |
|
|
|
"snappycomp," |
|
|
|
"snappyuncomp," |
|
|
|
"zstdcomp," |
|
|
@ -683,6 +685,12 @@ class Benchmark { |
|
|
|
} else if (name == Slice("ReadRandomWhileDeleting")) { |
|
|
|
num_threads++; |
|
|
|
method = &Benchmark::ReadRandomWhileDeleting; |
|
|
|
} else if (name == Slice("WriteRandomWithIndex")) { |
|
|
|
fresh_db = true; |
|
|
|
method = &Benchmark::WriteRandomWithIndex; |
|
|
|
} else if (name == Slice("WriteSeqWithIndex")) { |
|
|
|
fresh_db = true; |
|
|
|
method = &Benchmark::WriteSeqWithIndex; |
|
|
|
} else if (name == Slice("snappycomp")) { |
|
|
|
method = &Benchmark::SnappyCompress; |
|
|
|
} else if (name == Slice("snappyuncomp")) { |
|
|
@ -1146,6 +1154,18 @@ class Benchmark { |
|
|
|
db_->DeleteIndex("age", write_options_); |
|
|
|
} |
|
|
|
|
|
|
|
void WriteSeqWithIndex(ThreadState* thread) { |
|
|
|
CreateIndex(thread); |
|
|
|
thread->stats.Start(); |
|
|
|
WriteSeq(thread); |
|
|
|
} |
|
|
|
|
|
|
|
void WriteRandomWithIndex(ThreadState* thread) { |
|
|
|
CreateIndex(thread); |
|
|
|
thread->stats.Start(); |
|
|
|
WriteRandom(thread); |
|
|
|
} |
|
|
|
|
|
|
|
void WriteSeqWhileCreating(ThreadState* thread) { |
|
|
|
if (thread->tid > 0) { |
|
|
|
WriteSeq(thread); |
|
|
|