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);
}
Aggregations