Search in sources :

Example 96 with GcResourceFile

use of com.tagtraum.perf.gcviewer.model.GcResourceFile in project GCViewer by chewiebug.

the class TestDataReaderSun1_6_0 method testFullGcIncrementalTimestamp.

@Test
public void testFullGcIncrementalTimestamp() throws Exception {
    ByteArrayInputStream in = new ByteArrayInputStream(("42927.215: [Full GC 42927.215: [CMS42927.255: [CMS-concurrent-sweep: 0.416/6.288 secs] [Times: user=17.38 sys=0.44, real=6.29 secs]" + "\n (concurrent mode failure): 262166K->215967K(785256K), 7.8308614 secs] 273998K->215967K(800040K), [CMS Perm : 523009K->155678K(524288K)] icms_dc=8 , 7.8320634 secs] [Times: user=4.59 sys=0.04, real=7.83 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("full gc pause", 7.8320634, model.getFullGCPause().getSum(), 0.00000001);
}
Also used : ByteArrayInputStream(java.io.ByteArrayInputStream) GcResourceFile(com.tagtraum.perf.gcviewer.model.GcResourceFile) GCModel(com.tagtraum.perf.gcviewer.model.GCModel) Test(org.junit.Test)

Example 97 with GcResourceFile

use of com.tagtraum.perf.gcviewer.model.GcResourceFile in project GCViewer by chewiebug.

the class TestDataReaderSun1_6_0 method testCMSAbortingPrecleanTimestamp.

@Test
public void testCMSAbortingPrecleanTimestamp() throws Exception {
    ByteArrayInputStream in = new ByteArrayInputStream(" CMS: abort preclean due to time 12467.886: [CMS-concurrent-abortable-preclean: 5.300/5.338 secs] [Times: user=10.70 sys=0.13, real=5.34 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("gc pause", 5.3, model.getConcurrentGCEvents().next().getPause(), 0.001);
}
Also used : ByteArrayInputStream(java.io.ByteArrayInputStream) GcResourceFile(com.tagtraum.perf.gcviewer.model.GcResourceFile) GCModel(com.tagtraum.perf.gcviewer.model.GCModel) Test(org.junit.Test)

Example 98 with GcResourceFile

use of com.tagtraum.perf.gcviewer.model.GcResourceFile in project GCViewer by chewiebug.

the class TestDataReaderSun1_6_0 method testCmsRemarkDatestamp.

@Test
public void testCmsRemarkDatestamp() throws Exception {
    ByteArrayInputStream in = new ByteArrayInputStream(("2011-10-05T04:23:39.427+0200: 13455.879: [GC[YG occupancy: 325751 K (471872 K)]13455.879: [Rescan (parallel) , 1.0591220 secs]13456.939: [weak refs processing, 0.0794109 secs] [1 CMS-remark: 1023653K(1572864K)] 1349404K(2044736K), 1.1490033 secs] [Times: user=19.09 sys=0.26, real=1.15 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("gc pause", 1.1490033, model.getGCPause().getSum(), 0.00000001);
}
Also used : ByteArrayInputStream(java.io.ByteArrayInputStream) GcResourceFile(com.tagtraum.perf.gcviewer.model.GcResourceFile) GCModel(com.tagtraum.perf.gcviewer.model.GCModel) Test(org.junit.Test)

Example 99 with GcResourceFile

use of com.tagtraum.perf.gcviewer.model.GcResourceFile in project GCViewer by chewiebug.

the class TestDataReaderSun1_6_0 method testCMSFullGcCmsInterrupted.

@Test
public void testCMSFullGcCmsInterrupted() throws Exception {
    // TODO CMS (concurrent mode interrupted) not recognised (ignored)
    ByteArrayInputStream in = new ByteArrayInputStream("78.579: [Full GC (System) 78.579: [CMS (concurrent mode interrupted): 64171K->1538K(107776K), 0.0088356 secs] 75362K->1538K(126912K), [CMS Perm : 2554K->2554K(21248K)], 0.0089351 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]".getBytes());
    DataReader reader = new DataReaderSun1_6_0(new GcResourceFile("byteArray"), in, GcLogType.SUN1_6);
    GCModel model = reader.read();
    assertEquals("count", 1, model.getPause().getN());
    assertEquals("full gc pause", 0.0089351, model.getFullGCPause().getSum(), 0.00000001);
}
Also used : ByteArrayInputStream(java.io.ByteArrayInputStream) GcResourceFile(com.tagtraum.perf.gcviewer.model.GcResourceFile) GCModel(com.tagtraum.perf.gcviewer.model.GCModel) Test(org.junit.Test)

Example 100 with GcResourceFile

use of com.tagtraum.perf.gcviewer.model.GcResourceFile in project GCViewer by chewiebug.

the class TestDataReaderSun1_6_0 method testCMSPromotionFailed.

@Test
public void testCMSPromotionFailed() throws Exception {
    ByteArrayInputStream in = new ByteArrayInputStream(("2011-10-05T16:05:55.964+0200: 41985.374: [GC 41985.375: [ParNew (promotion failed): 104960K->100764K(104960K), 0.3379238 secs]41985.713: [CMS: 1239589K->897516K(1398144K), 38.3189415 secs] 1336713K->897516K(1503104K), [CMS Perm : 55043K->53511K(91736K)], 38.6583674 secs] [Times: user=39.22 sys=0.06, real=38.66 secs]").getBytes());
    DataReader reader = new DataReaderSun1_6_0(new GcResourceFile("byteArray"), in, GcLogType.SUN1_6);
    GCModel model = reader.read();
    assertEquals("gc pause", 38.6583674, model.getFullGCPause().getSum(), 0.000001);
}
Also used : ByteArrayInputStream(java.io.ByteArrayInputStream) GcResourceFile(com.tagtraum.perf.gcviewer.model.GcResourceFile) GCModel(com.tagtraum.perf.gcviewer.model.GCModel) Test(org.junit.Test)

Aggregations

GcResourceFile (com.tagtraum.perf.gcviewer.model.GcResourceFile)186 Test (org.junit.Test)178 GCModel (com.tagtraum.perf.gcviewer.model.GCModel)133 ByteArrayInputStream (java.io.ByteArrayInputStream)118 InputStream (java.io.InputStream)69 GCResource (com.tagtraum.perf.gcviewer.model.GCResource)55 GCEvent (com.tagtraum.perf.gcviewer.model.GCEvent)21 GcResourceSeries (com.tagtraum.perf.gcviewer.model.GcResourceSeries)11 File (java.io.File)8 ArrayList (java.util.ArrayList)6 GCViewerGuiController (com.tagtraum.perf.gcviewer.ctrl.impl.GCViewerGuiController)2 AbstractGCEvent (com.tagtraum.perf.gcviewer.model.AbstractGCEvent)2 LogRecord (java.util.logging.LogRecord)2 Matchers.containsString (org.hamcrest.Matchers.containsString)2 Matchers.isEmptyString (org.hamcrest.Matchers.isEmptyString)2 GCModelLoader (com.tagtraum.perf.gcviewer.ctrl.GCModelLoader)1 DataReader (com.tagtraum.perf.gcviewer.imp.DataReader)1 DataReaderFactory (com.tagtraum.perf.gcviewer.imp.DataReaderFactory)1 DoubleData (com.tagtraum.perf.gcviewer.math.DoubleData)1 IntData (com.tagtraum.perf.gcviewer.math.IntData)1