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

Method random01

flow/DeterministicRandom.cpp:40–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38};
39
40double DeterministicRandom::random01() {
41 double d = gen64() / double(uint64_t(-1));
42 if (randLog && useRandLog)
43 fprintf(randLog, "R01 %f\n", d);
44 return d;
45}
46
47int DeterministicRandom::randomInt(int min, int maxPlusOne) {
48 ASSERT(min < maxPlusOne);

Callers 15

Trace.cppFile · 0.80
createMethod · 0.80
IndexedSet.cppFile · 0.80
Deque.cppFile · 0.80
randomlyThrowMethod · 0.80
getSBVarFunction · 0.80
logMethod · 0.80
getMagazineMethod · 0.80
runMethod · 0.80
checkForSlowTaskMethod · 0.80
initializeMethod · 0.80

Calls 1

fprintfFunction · 0.85

Tested by 15

getRandomKeyMethod · 0.64
keyForIndexMethod · 0.64
Future<Void> poissonFunction · 0.64
_setupMethod · 0.64
randomKeyFunction · 0.64
TestGetRange0Method · 0.64
TestGetRange2Method · 0.64
TestAtomicOpMethod · 0.64
TestSetOptionMethod · 0.64
TestOnErrorMethod · 0.64
addSampleMethod · 0.64