Microbenchmarks with JMH / Java Microbenchmark Harness

Writing microbenchmarks for parts of our applications is not always easy – especially when the internals of the virtual machine, the just-in-time-compiler and such things are coming into effect. Java Microbenchmark Harness is a tool that takes care of creating JVM warmup-cycles, handling benchmark-input-parameters and running benchmarks as isolated processes etc. Now following a few short examples for writing microbenchmarks with JMH. Figure 1. Java JMH Microbenchmarks running in IntelliJ...

October 2, 2017 · 8 min · 1578 words · Micha Kops

Snippet: Java 9 Modules and JPMS

Playing around with the new module system in Java 9 I simply wanted to write down how to achieve the most basic tasks. Therefore I created the following module how-to based upon a simple demonstration project consisting of two dependant modules. Figure 1. Modules Component-Diagram Prerequisites and Setup We need an early access build of the Java ™ 9 JDK, available for download here. In addition we should make sure, that our environment variable JAVA_HOME is set to the corresponding directory and calling java -version returns something similar to this: ...

April 17, 2017 · 6 min · 1240 words · Micha Kops