use of com.tagtraum.perf.gcviewer.model.GCModel in project GCViewer by chewiebug.
the class TestDataReaderSun1_6_0 method testPrintTenuringDistributionPromotionFailed.
@Test
public void testPrintTenuringDistributionPromotionFailed() throws Exception {
ByteArrayInputStream in = new ByteArrayInputStream(("2011-02-14T13:14:36.298+0100: 31533.871: [GC 31533.871: [ParNew (promotion failed)" + "\nDesired survivor size 524288 bytes, new threshold 1 (max 4)" + "\n- age 1: 703560 bytes, 703560 total" + "\n- age 2: 342056 bytes, 1045616 total" + "\n : 9321K->9398K(9792K), 0.0563031 secs]31533.928: [CMS: 724470K->317478K(931248K), 13.5375713 secs] 733688K->317478K(941040K), [CMS Perm : 51870K->50724K(86384K)], 13.5959700 secs] [Times: user=14.03 sys=0.03, real=13.60 secs]").getBytes());
DataReader reader = new DataReaderSun1_6_0(new GcResourceFile("byteArray"), in, GcLogType.SUN1_6);
GCModel model = reader.read();
assertEquals("GC count", 1, model.size());
assertEquals("event pause", 13.5959700, model.getFullGCPause().getMax(), 0.0000001);
}
use of com.tagtraum.perf.gcviewer.model.GCModel 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.GCModel 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.GCModel 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.GCModel 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));
}
Aggregations