public static void main(String[] args) throws RunnerException {
        Options opt = new OptionsBuilder()
                .include(LRUCacheBenchmark.class.getSimpleName())
                .forks(2)
                .build();

        new Runner(opt).run();
    }
This is a simple example of a JMH benchmark.

The sample code provided by the JMH project is a great place to start learning how to write correct benchmarks:
http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/
jmh-benchmarks/src/main/java/org/apache/kafka/jmh/cache/LRUCacheBenchmark.java