use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class TestDataReaderIBM_J9_R26 method testFullHeaderWithAfGcs.
@Test
public void testFullHeaderWithAfGcs() throws Exception {
TestLogHandler handler = new TestLogHandler();
handler.setLevel(Level.WARNING);
GCResource gcResource = new GcResourceFile("SampleIBMJ9_R26_GAFP1_full_header.txt");
gcResource.getLogger().addHandler(handler);
DataReader reader = getDataReader(gcResource);
GCModel model = reader.read();
assertThat("model size", model.size(), is(1));
GCEvent event = (GCEvent) model.get(0);
assertThat("pause", event.getPause(), closeTo(0.00529, 0.0000001));
assertThat("number of errors", handler.getCount(), is(1));
}
use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class TestDataReaderIBM_J9_R26 method testSystemGc.
@Test
public void testSystemGc() throws Exception {
TestLogHandler handler = new TestLogHandler();
handler.setLevel(Level.WARNING);
GCResource gcResource = new GcResourceFile("SampleIBMJ9_R26_GAFP1_global.txt");
gcResource.getLogger().addHandler(handler);
DataReader reader = getDataReader(gcResource);
GCModel model = reader.read();
assertThat("model size", model.size(), is(1));
GCEvent event = (GCEvent) model.get(0);
assertThat("pause", event.getPause(), closeTo(0.036392, 0.0000001));
assertThat("total before", event.getTotal(), is(toKiloBytes(514064384)));
assertThat("free before", event.getPreUsed(), is(toKiloBytes(514064384 - 428417552)));
assertThat("free after", event.getPostUsed(), is(toKiloBytes(514064384 - 479900360)));
assertThat("total young before", event.getYoung().getTotal(), is(toKiloBytes(111411200)));
assertThat("young before", event.getYoung().getPreUsed(), is(toKiloBytes(111411200 - 29431656)));
assertThat("young after", event.getYoung().getPostUsed(), is(toKiloBytes(111411200 - 80831520)));
assertThat("total tenured before", event.getTenured().getTotal(), is(toKiloBytes(402653184)));
assertThat("tenured before", event.getTenured().getPreUsed(), is(toKiloBytes(402653184 - 398985896)));
assertThat("tenured after", event.getTenured().getPostUsed(), is(toKiloBytes(402653184 - 399068840)));
assertThat("number of errors", handler.getCount(), is(0));
}
use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class TestDataReaderIBM_J9_R27 method testSystemGc.
@Test
public void testSystemGc() throws Exception {
TestLogHandler handler = new TestLogHandler();
handler.setLevel(Level.WARNING);
GCResource gcResource = new GcResourceFile("SampleIBMJ9_R27_SR1_global.txt");
gcResource.getLogger().addHandler(handler);
DataReader reader = getDataReader(gcResource);
GCModel model = reader.read();
assertThat("model size", model.size(), is(1));
GCEvent event = (GCEvent) model.get(0);
assertThat("pause", event.getPause(), closeTo(0.075863, 0.0000001));
assertThat("number of errors", handler.getCount(), is(0));
}
use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class TestDataReaderSun1_6_0 method testCmsGcLocker.
@Test
public void testCmsGcLocker() throws Exception {
TestLogHandler handler = new TestLogHandler();
handler.setLevel(Level.WARNING);
GCResource gcResource = new GcResourceFile("byteArray");
gcResource.getLogger().addHandler(handler);
ByteArrayInputStream in = new ByteArrayInputStream(("2269.664: [CMS-concurrent-sweep-start]" + "\n2270.039: [GC 2270.039: [ParNew: 3686400K->3686400K(3686400K), 0.0000270 secs] 19876932K->19876932K(20070400K), 0.0000980 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]" + "\nGC locker: Trying a full collection because scavenge failed" + "\n2270.039: [Full GC 2270.039: [CMS2281.247: [CMS-concurrent-sweep: 11.558/11.583 secs] [Times: user=13.89 sys=0.08, real=11.58 secs]" + "\n (concurrent mode failure): 16190532K->14091936K(16384000K), 64.4965310 secs] 19876932K->14091936K(20070400K), [CMS Perm : 111815K->111803K(262144K)], 64.4966380 secs] [Times: user=64.41 sys=0.00, real=64.50 secs]" + "\n2334.567: [GC [1 CMS-initial-mark: 14091936K(16384000K)] 14164705K(20070400K), 0.0180200 secs] [Times: user=0.02 sys=0.00, real=0.02 secs]" + "\n2334.587: [CMS-concurrent-mark-start]").getBytes());
DataReader reader = new DataReaderSun1_6_0(gcResource, in, GcLogType.SUN1_6);
GCModel model = reader.read();
assertThat("count", model.size(), is(6));
assertThat("parse warning count", handler.getCount(), is(0));
}
use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class TestDataReaderSun1_6_0 method cmsConcurrentModeFailureWithComma.
@Test
public void cmsConcurrentModeFailureWithComma() throws Exception {
TestLogHandler handler = new TestLogHandler();
handler.setLevel(Level.WARNING);
GCResource gcResource = new GcResourceFile("byteArray");
gcResource.getLogger().addHandler(handler);
ByteArrayInputStream in = new ByteArrayInputStream(("163914,315: [GC 163914,316: [ParNew (promotion failed): 717051K->680031K(755008K), 2,6660558 secs]163916,982: [CMS163928,452: [CMS-concurrent-sweep: 20,622/86,301 secs] [Times: user=380,61 sys=2,63, real=86,30 secs]" + "\n (concurrent mode failure): 2874510K->2846370K(3355456K), 104,9219455 secs] 3591303K->2846370K(4110464K), [CMS Perm : 155672K->155662K(259600K)] icms_dc=13 , 107,5896657 secs] [Times: user=108,25 sys=0,10, real=107,59 secs]").getBytes());
DataReader reader = new DataReaderSun1_6_0(gcResource, in, GcLogType.SUN1_6);
GCModel model = reader.read();
assertThat("count", model.size(), is(2));
assertThat("1st event", model.get(0).getTypeAsString(), equalTo("CMS-concurrent-sweep"));
assertThat("2nd event", model.get(1).getTypeAsString(), equalTo("GC; ParNew (promotion failed); CMS (concurrent mode failure); CMS Perm"));
assertThat("parse warning count", handler.getCount(), is(0));
}
Aggregations