Skip to content

Instantly share code, notes, and snippets.

Andreas Mueller jsound

Block or report user

Report or block jsound

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jsound
jsound / MixedRandomListRealWorld_GarbageProducer
Created Apr 10, 2014
GC benchmark similar to MixedRandomList but with CPU usage < 100% and with reasonable GC rate
View MixedRandomListRealWorld_GarbageProducer
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()
@jsound
jsound / GarbageOnly_GarbageProducer
Created Dec 23, 2013
A simple GC micro benchmark that creates only objects of 0 lifetime (but as many of them as possible)
View GarbageOnly_GarbageProducer
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;
@jsound
jsound / MixedRandomList_GarbageProducer
Created Dec 23, 2013
GC benchmark producing a mix of lifetime=0 and lifetime>0 objects which are kept in randomly updated lists
View MixedRandomList_GarbageProducer
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
*/
You can’t perform that action at this time.