MCPcopy Create free account
hub / github.com/apple/foundationdb / getRandomKeyIndex

Function getRandomKeyIndex

fdbserver/workloads/Mako.actor.cpp:673–681  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

671 }
672
673 int64_t getRandomKeyIndex(uint64_t rowCount) {
674 int64_t randomKeyIndex;
675 if (zipf) {
676 randomKeyIndex = zipfian_next();
677 } else {
678 randomKeyIndex = deterministicRandom()->randomInt64(0, rowCount);
679 }
680 return randomKeyIndex;
681 }
682 void parseOperationsSpec() {
683 const char* ptr = operationsSpec.c_str();
684 int op = 0;

Callers

nothing calls this directly

Calls 3

zipfian_nextFunction · 0.85
deterministicRandomFunction · 0.85
randomInt64Method · 0.80

Tested by

no test coverage detected