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

Function getRandomKeySelector

fdbserver/workloads/WriteDuringRead.actor.cpp:727–731  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

725 Key getRandomVersionStampKey() { return versionStampKeyForIndex(deterministicRandom()->randomInt(0, nodes)); }
726
727 KeySelector getRandomKeySelector() {
728 int scale = 1 << deterministicRandom()->randomInt(0, 14);
729 return KeySelectorRef(
730 getRandomKey(), deterministicRandom()->random01() < 0.5, deterministicRandom()->randomInt(-scale, scale));
731 }
732
733 GetRangeLimits getRandomLimits() {
734 int kind = deterministicRandom()->randomInt(0, 3);

Callers 2

_startMethod · 0.85
randomTransactionMethod · 0.85

Calls 5

deterministicRandomFunction · 0.85
random01Method · 0.80
getRandomKeyFunction · 0.70
KeySelectorRefClass · 0.50
randomIntMethod · 0.45

Tested by

no test coverage detected