Class ThreadLocalPerformance
- java.lang.Object
-
- org.apache.commons.rng.examples.jmh.simple.ThreadLocalPerformance
-
public class ThreadLocalPerformance extends Object
Executes benchmark to compare the speed of generation of low frequency random numbers on multiple-threads.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ThreadLocalPerformance.LocalSources
The benchmark state (to retrieve the various "RandomSource"s thread locally).static class
ThreadLocalPerformance.Sources
The benchmark state (to retrieve the various "RandomSource"s).
-
Constructor Summary
Constructors Constructor Description ThreadLocalPerformance()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
randomSourceCreate(ThreadLocalPerformance.Sources sources)
long
threadLocalRandom()
long
threadLocalRandomSourceCurrent(ThreadLocalPerformance.Sources sources)
long
threadLocalRandomWrapped()
long
threadLocalUniformRandomProvider(ThreadLocalPerformance.LocalSources localSources)
-
-
-
Constructor Detail
-
ThreadLocalPerformance
public ThreadLocalPerformance()
-
-
Method Detail
-
threadLocalRandom
public long threadLocalRandom()
- Returns:
- the result
-
threadLocalRandomWrapped
public long threadLocalRandomWrapped()
- Returns:
- the result
-
randomSourceCreate
public long randomSourceCreate(ThreadLocalPerformance.Sources sources)
- Parameters:
sources
- Source of randomness.- Returns:
- the result
-
threadLocalRandomSourceCurrent
public long threadLocalRandomSourceCurrent(ThreadLocalPerformance.Sources sources)
- Parameters:
sources
- Source of randomness.- Returns:
- the result
-
threadLocalUniformRandomProvider
public long threadLocalUniformRandomProvider(ThreadLocalPerformance.LocalSources localSources)
- Parameters:
localSources
- Local source of randomness.- Returns:
- the result
-
-