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

Method ReadHot

src/leveldb/benchmarks/db_bench.cc:797–808  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

795 }
796
797 void ReadHot(ThreadState* thread) {
798 ReadOptions options;
799 std::string value;
800 const int range = (FLAGS_num + 99) / 100;
801 for (int i = 0; i < reads_; i++) {
802 char key[100];
803 const int k = thread->rand.Next() % range;
804 snprintf(key, sizeof(key), "%016d", k);
805 db_->Get(options, key, &value);
806 thread->stats.FinishedSingleOp();
807 }
808 }
809
810 void SeekRandom(ThreadState* thread) {
811 ReadOptions options;

Callers

nothing calls this directly

Calls 3

NextMethod · 0.45
GetMethod · 0.45
FinishedSingleOpMethod · 0.45

Tested by

no test coverage detected