MCPcopy Create free account
hub / github.com/ElementsProject/elements / ReadReverse

Method ReadReverse

src/leveldb/benchmarks/db_bench.cc:754–765  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

752 }
753
754 void ReadReverse(ThreadState* thread) {
755 Iterator* iter = db_->NewIterator(ReadOptions());
756 int i = 0;
757 int64_t bytes = 0;
758 for (iter->SeekToLast(); i < reads_ && iter->Valid(); iter->Prev()) {
759 bytes += iter->key().size() + iter->value().size();
760 thread->stats.FinishedSingleOp();
761 ++i;
762 }
763 delete iter;
764 thread->stats.AddBytes(bytes);
765 }
766
767 void ReadRandom(ThreadState* thread) {
768 ReadOptions options;

Callers

nothing calls this directly

Calls 10

AddBytesMethod · 0.80
ReadOptionsClass · 0.50
NewIteratorMethod · 0.45
SeekToLastMethod · 0.45
ValidMethod · 0.45
PrevMethod · 0.45
sizeMethod · 0.45
keyMethod · 0.45
valueMethod · 0.45
FinishedSingleOpMethod · 0.45

Tested by

no test coverage detected