Search in sources :

Example 6 with DoubleData

use of com.tagtraum.perf.gcviewer.math.DoubleData in project GCViewer by chewiebug.

the class TestDataReaderSun1_7_0G1 method eventNoMemory.

@Test
public void eventNoMemory() throws Exception {
    // there are (rarely) events, where the memory information could not be parsed,
    // because the line with the memory information was mixed with another event
    // looks like this:    [251.448:  213M->174M(256M)[GC concurrent-mark-start]
    // (produced using -XX:+PrintGcDetails -XX:+PrintHeapAtGC)
    GCEvent event = new GCEvent();
    event.setType(Type.G1_YOUNG_INITIAL_MARK);
    event.setTimestamp(0.5);
    event.setPause(0.2);
    // but no memory information -> all values zero there
    GCModel model = new GCModel();
    model.add(event);
    DoubleData initiatingOccupancyFraction = model.getCmsInitiatingOccupancyFraction();
    assertEquals("fraction", 0, initiatingOccupancyFraction.getSum(), 0.1);
}
Also used : DoubleData(com.tagtraum.perf.gcviewer.math.DoubleData) Test(org.junit.Test)

Aggregations

DoubleData (com.tagtraum.perf.gcviewer.math.DoubleData)6 Test (org.junit.Test)3 GCModel (com.tagtraum.perf.gcviewer.model.GCModel)2 GcResourceFile (com.tagtraum.perf.gcviewer.model.GcResourceFile)1 ModelChartImpl (com.tagtraum.perf.gcviewer.view.ModelChartImpl)1 GCPreferences (com.tagtraum.perf.gcviewer.view.model.GCPreferences)1 Theory (org.junit.experimental.theories.Theory)1