Class NextBytesGenerationPerformance
- java.lang.Object
-
- org.apache.commons.rng.examples.jmh.core.AbstractBenchmark
-
- org.apache.commons.rng.examples.jmh.core.NextBytesGenerationPerformance
-
public class NextBytesGenerationPerformance extends AbstractBenchmark
Executes benchmark to compare the speed of generation of random numbers from the various source providers forUniformRandomProvider.nextBytes(byte[]).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNextBytesGenerationPerformance.SourcesThe benchmark state (retrieve the various "RandomSource"s).
-
Constructor Summary
Constructors Constructor Description NextBytesGenerationPerformance()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]baselineBytes()Baseline for a JMH method call returning abyte[].voidbaselineVoid()Baseline for a JMH method call with no return value.byte[]nextBytes(NextBytesGenerationPerformance.Sources sources)Exercise theUniformRandomProvider.nextBytes(byte[])method.
-
-
-
Constructor Detail
-
NextBytesGenerationPerformance
public NextBytesGenerationPerformance()
-
-
Method Detail
-
baselineVoid
public void baselineVoid()
Baseline for a JMH method call with no return value.
-
baselineBytes
public byte[] baselineBytes()
Baseline for a JMH method call returning abyte[].- Returns:
- the value
-
nextBytes
public byte[] nextBytes(NextBytesGenerationPerformance.Sources sources)
Exercise theUniformRandomProvider.nextBytes(byte[])method.- Parameters:
sources- Source of randomness.- Returns:
- the boolean
-
-