d3v3l0 / make-or-break

Demo project for a talk on effects of Java code on CPU level

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make or Break

This is an accompanying demo project for my talk "Make or Break: The Big Impact of Small Changes on Performance in Java Programs" (link to the slide follows around the end of March). It contains JMH microbenchmarks to demonstrate different effects of Java code on CPU level.

Getting Started

Prerequisites

The project requires at least JDK 8.

Installation and Usage

If Gradle is not installed:

git clone https://github.com/danielmitterdorfer/make-or-break.git
cd make-or-break
./gradlew shadow
java -jar build/libs/make-or-break-0.1.0-all.jar

Or alternatively, if Gradle > 2.1 is installed:

git clone https://github.com/danielmitterdorfer/make-or-break.git
cd make-or-break
gradle shadow
java -jar build/libs/make-or-break-0.1.0-all.jar

Usage with perf

You'll get the most out of the benchmarks when running them with the JMH perf profiler. This requires that the benchmark is run on Linux as perf is only supported there. So please make sure perf is installed. Please consult the documentation of your Linux distribution on how to do that.

If perf is installed, you can run the benchmarks with the JMH perf profiler:

java -jar build/libs/make-or-break-0.1.0-all.jar -prof perf

This will print perf statistics for each iteration in addition to the usually gathered metrics.

License

'Make or Break' is distributed under the terms of the Apache Software Foundation license, version 2.0.

About

Demo project for a talk on effects of Java code on CPU level


Languages

Language:Java 67.7%Language:R 32.3%