use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class TestDataReaderSun1_8_0 method scavengeBeforeRemarkPrintHeapAtGC_YGOccupancy.
@Test
public void scavengeBeforeRemarkPrintHeapAtGC_YGOccupancy() throws Exception {
TestLogHandler handler = new TestLogHandler();
handler.setLevel(Level.WARNING);
GCResource gcResource = new GcResourceFile("SampleSun1_8_0CMS_ScavengeBeforeRemark_HeapAtGc.txt");
gcResource.getLogger().addHandler(handler);
DataReader reader = getDataReader(gcResource);
GCModel model = reader.read();
assertThat("gc count", model.size(), is(2));
assertThat("scavenge before remark event", model.get(0).getPause(), closeTo(0.0000778, 0.000000001));
assertThat("remark event", model.get(1).getPause(), closeTo(0.0019970 - 0.0000778, 0.000000001));
assertEquals("number of errors", 0, handler.getCount());
}
use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class TestDataReaderSun1_8_0 method parallelPrintHeapAtGC.
@Test
public void parallelPrintHeapAtGC() throws Exception {
TestLogHandler handler = new TestLogHandler();
handler.setLevel(Level.WARNING);
GCResource gcResource = new GcResourceFile("SampleSun1_8_0ParallelPrintHeapAtGC.txt");
gcResource.getLogger().addHandler(handler);
DataReader reader = getDataReader(gcResource);
GCModel model = reader.read();
assertThat("gc pause sum", model.getPause().getSum(), closeTo(0.0103603, 0.000000001));
assertThat("number of errors", handler.getCount(), is(0));
}
use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class TestDataReaderSun1_8_0 method parallelApple.
@Test
public void parallelApple() throws Exception {
TestLogHandler handler = new TestLogHandler();
handler.setLevel(Level.WARNING);
GCResource gcResource = new GcResourceFile("SampleSun1_8_0Parallel_Apple.txt");
gcResource.getLogger().addHandler(handler);
DataReader reader = getDataReader(gcResource);
GCModel model = reader.read();
assertThat("gc count", model.size(), is(6));
assertEquals("number of errors", 0, handler.getCount());
}
use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class TestDataReaderSun1_8_0G1 method fullGcWithDetailedSizes.
/**
* In java 8, suddenly the full gc events in G1 got detailed information about the generation
* sizes again. Test, that they are parsed correctly.
*/
@Test
public void fullGcWithDetailedSizes() throws Exception {
TestLogHandler handler = new TestLogHandler();
handler.setLevel(Level.WARNING);
GCResource gcResource = new GcResourceFile("byteArray");
ByteArrayInputStream in = new ByteArrayInputStream(("2014-07-24T13:49:45.090+0400: 92457.841: [Full GC (Allocation Failure) 5811M->3097M(12G), 8.9862292 secs]" + "\n [Eden: 4096.0K(532.0M)->0.0B(612.0M) Survivors: 80.0M->0.0B Heap: 5811.9M(12.0G)->3097.8M(12.0G)], [Metaspace: 95902K->95450K(1140736K)]" + "\n [Times: user=12.34 sys=0.22, real=8.99 secs]").getBytes());
DataReader reader = new DataReaderSun1_6_0G1(gcResource, in, GcLogType.SUN1_8);
GCModel model = reader.read();
GCEvent event = (GCEvent) model.get(0);
assertThat("footprint", event.getTotal(), is(12 * 1024 * 1024));
assertThat("yound before", event.getYoung().getPreUsed(), is(4096 + 80 * 1024));
assertThat("tenured", event.getTenured().getTotal(), is(12 * 1024 * 1024 - 612 * 1024));
assertThat("metaspace", event.getPerm().getTotal(), is(1140736));
assertThat("perm", model.getPermAllocatedSizes().getN(), is(1));
assertThat("warning count", handler.getCount(), is(0));
}
use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class TestDataReaderSun1_8_0G1 method printGCCauseTenuringDistribution.
@Test
public void printGCCauseTenuringDistribution() throws Exception {
TestLogHandler handler = new TestLogHandler();
handler.setLevel(Level.WARNING);
GCResource gcResource = new GcResourceFile("SampleSun1_8_0G1PrintGCCausePrintTenuringDistribution.txt");
gcResource.getLogger().addHandler(handler);
DataReader reader = getDataReader(gcResource);
GCModel model = reader.read();
assertEquals("gc pause sum", 16.7578613, model.getPause().getSum(), 0.000000001);
assertEquals("number of errors", 0, handler.getCount());
}
Aggregations