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

Function getKeyForIndex

fdbserver/workloads/WriteDuringRead.actor.cpp:707–714  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

705 Key getRandomKey() { return getKeyForIndex(deterministicRandom()->randomInt(0, nodes)); }
706
707 Key getKeyForIndex(int idx) {
708 idx += minNode;
709 if (adjacentKeys) {
710 return Key(keyPrefix + (idx ? std::string(idx, '\x00') : ""));
711 } else {
712 return Key(keyPrefix + format("%010d", idx));
713 }
714 }
715
716 Key versionStampKeyForIndex(int idx) {
717 Key result = KeyRef(getKeyForIndex(idx).toString() + std::string(14, '\x00'));

Callers 9

getRandomKeyFunction · 0.85
versionStampKeyForIndexFunction · 0.85
getRandomRangeFunction · 0.85
getRandomKeyMethod · 0.85
getRandomRangeMethod · 0.85
getRandomKeyMethod · 0.85
getRandomRangeMethod · 0.85

Calls 2

KeyClass · 0.50
formatFunction · 0.50

Tested by

no test coverage detected