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

Method ReadSequential

src/leveldb/benchmarks/db_bench.cc:741–752  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

739 }
740
741 void ReadSequential(ThreadState* thread) {
742 Iterator* iter = db_->NewIterator(ReadOptions());
743 int i = 0;
744 int64_t bytes = 0;
745 for (iter->SeekToFirst(); i < reads_ && iter->Valid(); iter->Next()) {
746 bytes += iter->key().size() + iter->value().size();
747 thread->stats.FinishedSingleOp();
748 ++i;
749 }
750 delete iter;
751 thread->stats.AddBytes(bytes);
752 }
753
754 void ReadReverse(ThreadState* thread) {
755 Iterator* iter = db_->NewIterator(ReadOptions());

Callers

nothing calls this directly

Calls 10

AddBytesMethod · 0.80
ReadOptionsClass · 0.50
NewIteratorMethod · 0.45
SeekToFirstMethod · 0.45
ValidMethod · 0.45
NextMethod · 0.45
sizeMethod · 0.45
keyMethod · 0.45
valueMethod · 0.45
FinishedSingleOpMethod · 0.45

Tested by

no test coverage detected