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

Function RandomKey

src/leveldb/db/db_test.cc:34–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34static std::string RandomKey(Random* rnd) {
35 int len =
36 (rnd->OneIn(3) ? 1 // Short sometimes to encourage collisions
37 : (rnd->OneIn(100) ? rnd->Skewed(10) : rnd->Uniform(10)));
38 return test::RandomKey(rnd, len);
39}
40
41namespace {
42class AtomicCounter {

Callers 2

TESTFunction · 0.70
TESTFunction · 0.50

Calls 3

OneInMethod · 0.80
SkewedMethod · 0.80
UniformMethod · 0.80

Tested by

no test coverage detected