Demonstrate overhead of finalizers in Java. Other examples explaining problems with Finalizers.
To build the project run following command from project root:
mvn clean install
There are 2 main Classes
SimpleBenchmark.java which is a simple example creating finalizable classes. This is to demonstrate worse case scenario.
BenchmarkWithGCProfiler.java which is a more detailed example creating finalizable classes with added CPU instruction cycle to demonstrate the real world scenario.
Environment:
I7 Quad Core processor 3.1 GHz
16 GB RAM
Initial Heap 1 GB
Max Heap 4GB
GC: G1GC