JDK 7 is just behind that door, and I am really excited about all the goodies that it brings with it.
While I was trying to benchmark JDK7 vs. older JDKs, I realized that the GC(Garbage Collector) is an unknown factor, i.e. while some piece of code is running, one can never know if the GC is running in parallel , in such a case that specific iteration might take much more time, hence the benchmark data will get corrupted.
So my suggestion is adding an awesome new block type: (JDK 8!!!)
no Garbage Collection block – noGC
//some code here;
While the code inside the noGC block is running, it’s promised that the GC won’t run in parallel
The AlmostOutOfMemoryError will get thrown in case the Heap is X% full (whereas X is configurable as -xnogcf )
Just to be clear, it wouldn’t help me out with benchmarking since the older JDKs do not support it, yet that was the trigger..
how would such a block would work in a multi-threaded environment is another issue..
In my opinion applications with a tiny real-time need would benefit a lot using such a block, much more than all those real-time Java frameworks out there…
Would love to hear your opinion