MCPcopy Create free account
hub / github.com/cmu-db/benchbase / random

Method random

src/main/java/com/oltpbenchmark/distributions/Utils.java:27–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25 private static final ThreadLocal<Random> rng = new ThreadLocal<>();
26
27 public static Random random() {
28 Random ret = rng.get();
29 if (ret == null) {
30 ret = new Random(rand.nextLong());
31 rng.set(ret);
32 }
33 return ret;
34 }
35
36 public static final long FNV_offset_basis_64 = 0xCBF29CE484222325L;
37 public static final long FNV_prime_64 = 1099511628211L;

Callers 2

getIntervalMethod · 0.80

Calls 3

getMethod · 0.45
nextLongMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected