This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package de.am.gc.benchmarks; | |
import java.util.ArrayList; | |
import java.util.List; | |
/** | |
* GC benchmark producing a mix of lifetime=0 and lifetime>0 objects which are kept in randomly updated lists. | |
* It is very similar to MixedRandomList: https://gist.github.com/jsound/8096954#file-mixedrandomlist_garbageproducer | |
* but with two changes to make it more real-world: | |
* 1. CPU usage is reduced by adding some latency using Thread.sleep() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package de.am.gc.benchmarks; | |
/** | |
* A GC micro benchmark running a given number of threads that create objects of a given size and dereference them immediately | |
* | |
* @author jsound | |
*/ | |
public class GarbageOnly { | |
// object size in bytes | |
private static final int DEFAULT_NUMBEROFTHREADS=8; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package de.am.gc.benchmarks; | |
import java.util.ArrayList; | |
import java.util.List; | |
/** | |
* GC benchmark producing a mix of lifetime=0 and lifetime>0 objects which are kept in randomly updated lists. | |
* | |
* @author jsound | |
*/ |