Class BaselineGenerationPerformance
- java.lang.Object
-
- org.apache.commons.rng.examples.jmh.core.BaselineGenerationPerformance
-
public class BaselineGenerationPerformance extends Object
Benchmarks to check linearity in the baseline implementations ofUniformRandomProvider
.These ordinarily do not need to be run. The benchmarks can be used to determine if the baseline scales linearly with workload. If not then the JVM has removed the baseline from the testing loop given that its result is predictable. The ideal baseline will:
- Run as fast as possible
- Not be removed from the execution path
The results of this benchmark should be plotted for each method using [numValues] vs [run time] to check linearity.
-
-
Constructor Summary
Constructors Constructor Description BaselineGenerationPerformance()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
nextBoolean(org.openjdk.jmh.infra.Blackhole bh)
Exercise theUniformRandomProvider.nextBoolean()
method.void
nextBytes(org.openjdk.jmh.infra.Blackhole bh)
Exercise theUniformRandomProvider.nextBytes(byte[])
method.void
nextDouble(org.openjdk.jmh.infra.Blackhole bh)
Exercise theUniformRandomProvider.nextDouble()
method.void
nextFloat(org.openjdk.jmh.infra.Blackhole bh)
Exercise theUniformRandomProvider.nextFloat()
method.void
nextInt(org.openjdk.jmh.infra.Blackhole bh)
Exercise theUniformRandomProvider.nextInt()
method.void
nextIntN(org.openjdk.jmh.infra.Blackhole bh)
Exercise theUniformRandomProvider.nextInt(int)
method.void
nextLong(org.openjdk.jmh.infra.Blackhole bh)
Exercise theUniformRandomProvider.nextLong()
method.void
nextLongN(org.openjdk.jmh.infra.Blackhole bh)
Exercise theUniformRandomProvider.nextLong(long)
method.
-
-
-
Constructor Detail
-
BaselineGenerationPerformance
public BaselineGenerationPerformance()
-
-
Method Detail
-
nextBytes
public void nextBytes(org.openjdk.jmh.infra.Blackhole bh)
Exercise theUniformRandomProvider.nextBytes(byte[])
method.Note: Currently there is not a test for
UniformRandomProvider.nextBytes(byte[], int, int)
since the two methods are implemented by the base Int/LongProvider class using the same code.- Parameters:
bh
- Data sink.
-
nextInt
public void nextInt(org.openjdk.jmh.infra.Blackhole bh)
Exercise theUniformRandomProvider.nextInt()
method.- Parameters:
bh
- Data sink.
-
nextIntN
public void nextIntN(org.openjdk.jmh.infra.Blackhole bh)
Exercise theUniformRandomProvider.nextInt(int)
method.- Parameters:
bh
- Data sink.
-
nextLong
public void nextLong(org.openjdk.jmh.infra.Blackhole bh)
Exercise theUniformRandomProvider.nextLong()
method.- Parameters:
bh
- Data sink.
-
nextLongN
public void nextLongN(org.openjdk.jmh.infra.Blackhole bh)
Exercise theUniformRandomProvider.nextLong(long)
method.- Parameters:
bh
- Data sink.
-
nextBoolean
public void nextBoolean(org.openjdk.jmh.infra.Blackhole bh)
Exercise theUniformRandomProvider.nextBoolean()
method.- Parameters:
bh
- Data sink.
-
nextFloat
public void nextFloat(org.openjdk.jmh.infra.Blackhole bh)
Exercise theUniformRandomProvider.nextFloat()
method.- Parameters:
bh
- Data sink.
-
nextDouble
public void nextDouble(org.openjdk.jmh.infra.Blackhole bh)
Exercise theUniformRandomProvider.nextDouble()
method.- Parameters:
bh
- Data sink.
-
-