Package net.kolotyluk.benchmark
Class PrimeThreadsCachedThreadPool
java.lang.Object
net.kolotyluk.benchmark.PrimeThreadsCachedThreadPool
- Direct Known Subclasses:
PrimeThreadsCachedThreadPool_jmhType_B1
Prime Numbers with Streams
These benchmarks can take a very long time to complete, and for some tests utilize almost 100% of all CPUs.
Make sure we are running with the right JDK for Project Loom$ "${JAVA_HOME}/bin/java" -version openjdk version "18-loom" 2022-03-15 OpenJDK Runtime Environment (build 18-loom+2-74) OpenJDK 64-Bit Server VM (build 18-loom+2-74, mixed mode, sharing)Make sure the laboratory has been compiled and installed for benchmarking.
$ cd laboratory $ mvn clean installRun the benchmarks.
$ cd benchmarks $ mvn clean verify $ "${JAVA_HOME}/bin/java" -jar target/benchmarks.jar PrimeNumbers
# Run complete. Total time: 01:44:07 REMEMBER: The numbers below are just data. To gain reusable insights, you need to follow up on why the numbers are the way they are. Use profilers (see -prof, -lprof), design factorial experiments, perform baseline and negative tests that provide experimental control, make sure the benchmarking environment is safe on JVM/OS/HW level, ask for reviews from the domain experts. Do not assume the numbers tell you what you want them to tell. Benchmark Mode Cnt Score Error Units PrimeThreadsCachedTreadPool.platformPrimesTo_1000 avgt 25 71.376 ± 6.313 ms/op PrimeThreadsCachedTreadPool.platformPrimesTo_10_000 avgt 25 246.932 ± 35.002 ms/op PrimeThreadsCachedTreadPool.platformPrimesTo_10_000_000 avgt 25 38564.159 ± 618.292 ms/op PrimeThreadsCachedTreadPool.virtualPrimesTo_1000 avgt 25 33.159 ± 0.229 ms/op PrimeThreadsCachedTreadPool.virtualPrimesTo_10_000 avgt 25 62.399 ± 0.698 ms/op PrimeThreadsCachedTreadPool.virtualPrimesTo_10_000_000 avgt 25 45667.084 ± 2736.951 ms/op
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
void
void
void
void
-
Constructor Details
-
PrimeThreadsCachedThreadPool
public PrimeThreadsCachedThreadPool()
-
-
Method Details
-
main
- Throws:
org.openjdk.jmh.runner.RunnerException
-
virtualPrimesTo_1000
public void virtualPrimesTo_1000() -
virtualPrimesTo_10_000
public void virtualPrimesTo_10_000() -
platformPrimesTo_1000
public void platformPrimesTo_1000() -
platformPrimesTo_10_000
public void platformPrimesTo_10_000()
-