use of com.tagtraum.perf.gcviewer.model.GcResourceFile in project GCViewer by chewiebug.
the class TestDataReaderSun1_6_0G1 method testPartialToSpaceOverflowInitialMark.
@Test
public void testPartialToSpaceOverflowInitialMark() throws Exception {
// special type of GC: 0.838: "[GC pause (partial) (to-space overflow) (initial-mark)..."
String fileName = "SampleSun1_6_0G1_partial_initialMarkToSpaceOverflow.txt";
InputStream in = getInputStream(fileName);
DataReader reader = new DataReaderSun1_6_0G1(new GcResourceFile(fileName), in, GcLogType.SUN1_6G1);
GCModel model = reader.read();
assertEquals("nummber of events", 2, model.size());
assertEquals("concurrent event type", Type.G1_CONCURRENT_MARK_START.toString(), model.getConcurrentGCEvents().next().getTypeAsString());
assertEquals("number of pauses", 1, model.getPause().getN());
assertEquals("gc pause sum", 0.00588343, model.getPause().getSum(), 0.000000001);
assertEquals("gc memory", 255 * 1024 - 197 * 1024, model.getFreedMemoryByGC().getMax());
assertEquals("max memory", 256 * 1024, model.getFootprint());
}
use of com.tagtraum.perf.gcviewer.model.GcResourceFile in project GCViewer by chewiebug.
the class TestDataReaderSun1_6_0G1 method testGcPausePattern.
@Test
public void testGcPausePattern() throws Exception {
InputStream in = new ByteArrayInputStream(("0.360: [GC concurrent-count-end, 0.0242674]").getBytes());
DataReader reader = new DataReaderSun1_6_0G1(new GcResourceFile("byteArray"), in, GcLogType.SUN1_6G1);
GCModel model = reader.read();
assertEquals("count", 1, model.size());
assertEquals("full gc pause", 0, model.getFullGCPause().getN());
}
use of com.tagtraum.perf.gcviewer.model.GcResourceFile in project GCViewer by chewiebug.
the class TestDataReaderSun1_6_0 method testFullGcIncrementalDatestamp2.
@Test
public void testFullGcIncrementalDatestamp2() throws Exception {
ByteArrayInputStream in = new ByteArrayInputStream(("2011-10-05T04:23:39.427+0200: 44189.823: [Full GC 44189.824: [CMS: 274825K->223922K(892264K), 8.0594203 secs] 327565K->223922K(992616K), [CMS Perm : 524287K->158591K(524288K)] icms_dc=0 , 8.0600619 secs] [Times: user=4.51 sys=0.05, real=8.06 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("full gc pause", 8.0600619, model.getFullGCPause().getSum(), 0.00000001);
}
use of com.tagtraum.perf.gcviewer.model.GcResourceFile in project GCViewer by chewiebug.
the class TestDataReaderSun1_6_0 method testCMSPromotionFailedPrintPromotionFailure.
@Test
public void testCMSPromotionFailedPrintPromotionFailure() throws Exception {
ByteArrayInputStream in = new ByteArrayInputStream(("2012-03-26T21:46:32.546+0200: 2.204: [GC 2.204: [ParNew (0: promotion failure size = 4098) (1: promotion failure size = 4098) (2: promotion failure size = 4098) (3: promotion failure size = 4098) (promotion failed): 39277K->39255K(39296K), 0.0175749 secs]2.221: [CMS: 87276K->43438K(87424K), 0.0276222 secs] 95765K->43438K(126720K), [CMS Perm : 2612K->2612K(21248K)], 0.0453577 secs] [Times: user=0.08 sys=0.00, real=0.05 secs]").getBytes());
DataReader reader = new DataReaderSun1_6_0(new GcResourceFile("byteArray"), in, GcLogType.SUN1_6);
GCModel model = reader.read();
assertEquals("gc type", "GC; ParNew (promotion failed); CMS; CMS Perm", model.getFullGCEvents().next().getTypeAsString());
}
use of com.tagtraum.perf.gcviewer.model.GcResourceFile in project GCViewer by chewiebug.
the class TestDataReaderSun1_6_0 method testCMSConcurrentModeFailureDate.
@Test
public void testCMSConcurrentModeFailureDate() throws Exception {
ByteArrayInputStream in = new ByteArrayInputStream(("2011-10-05T15:53:24.119+0200: 41403.025: [GC 41403.025: [ParNew (promotion failed): 104960K->101572K(104960K), 0.3275017 secs]41403.353: [CMS2011-10-05T15:53:24.629+0200: 41403.534: [CMS-concurrent-abortable-preclean: 1.992/2.650 secs] [Times: user=4.40 sys=0.06, real=2.65 secs]" + "\n (concurrent mode failure): 1295417K->906090K(1398144K), 32.4123146 secs] 1395643K->906090K(1503104K), [CMS Perm : 54986K->53517K(91576K)], 32.7410609 secs] [Times: user=33.10 sys=0.05, real=32.74 secs]").getBytes());
DataReader reader = new DataReaderSun1_6_0(new GcResourceFile("byteArray"), in, GcLogType.SUN1_6);
GCModel model = reader.read();
assertEquals("GC count", 2, model.size());
assertEquals("gc pause", 32.7410609, model.getFullGCPause().getMax(), 0.000001);
}
Aggregations