Search in sources :

Example 91 with GcResourceFile

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

the class TestDataReaderFactory method testJRockit1_6GenParVerbose.

@Test
public void testJRockit1_6GenParVerbose() throws Exception {
    String fileName = "SampleJRockit1_6_33_gc_mode_genpar_verbosenursery.txt";
    try (InputStream in = getInputStreamJRockit(fileName)) {
        DataReader reader = new DataReaderFactory().getDataReader(new GcResourceFile(fileName), in);
        assertDataReader(DataReaderJRockit1_6_0.class, reader.getClass());
    }
}
Also used : ByteArrayInputStream(java.io.ByteArrayInputStream) InputStream(java.io.InputStream) GcResourceFile(com.tagtraum.perf.gcviewer.model.GcResourceFile) Test(org.junit.Test)

Example 92 with GcResourceFile

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

the class TestDataReaderFactory method testJRockit1_4GcReportPrioPauseTime.

@Test
public void testJRockit1_4GcReportPrioPauseTime() throws Exception {
    String fileName = "SampleJRockit1_4_2ts-gcreport-gcpriopausetime.txt";
    try (InputStream in = getInputStreamJRockit(fileName)) {
        DataReader reader = new DataReaderFactory().getDataReader(new GcResourceFile(fileName), in);
        assertDataReader(DataReaderJRockit1_4_2.class, reader.getClass());
    }
}
Also used : ByteArrayInputStream(java.io.ByteArrayInputStream) InputStream(java.io.InputStream) GcResourceFile(com.tagtraum.perf.gcviewer.model.GcResourceFile) Test(org.junit.Test)

Example 93 with GcResourceFile

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

the class TestDataReaderFactory method testJRockit1_6ParConVerbose.

@Test
public void testJRockit1_6ParConVerbose() throws Exception {
    String fileName = "SampleJRockit1_6_verbose_gc_mode_singleparcon.txt";
    try (InputStream in = getInputStreamJRockit(fileName)) {
        DataReader reader = new DataReaderFactory().getDataReader(new GcResourceFile(fileName), in);
        assertDataReader(DataReaderJRockit1_6_0.class, reader.getClass());
    }
}
Also used : ByteArrayInputStream(java.io.ByteArrayInputStream) InputStream(java.io.InputStream) GcResourceFile(com.tagtraum.perf.gcviewer.model.GcResourceFile) Test(org.junit.Test)

Example 94 with GcResourceFile

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

the class TestDataReaderSun1_6_0 method testPrintTenuringDistribution.

@Test
public void testPrintTenuringDistribution() throws Exception {
    ByteArrayInputStream in = new ByteArrayInputStream(("2011-02-14T13:15:24.164+0100: 31581.748: [GC 31581.748: [ParNew" + "\nDesired survivor size 5963776 bytes, new threshold 1 (max 4)" + "\n- age   1:    8317928 bytes,    8317928 total" + "\n: 92938K->8649K(104832K), 0.0527364 secs] 410416K->326127K(1036928K), 0.0533874 secs] [Times: user=0.46 sys=0.09, real=0.05 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", 0.0533874, model.getGCPause().getMax(), 0.0000001);
    assertEquals("promotion", 0, model.getPromotion().getMax());
}
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 95 with GcResourceFile

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

the class TestDataReaderSun1_6_0 method testPrintCmsStatistics.

@Test
public void testPrintCmsStatistics() throws Exception {
    // will not be able to extract sense from this line, but must not loop
    ByteArrayInputStream in = new ByteArrayInputStream(("0.521: [GC[YG occupancy: 2234 K (14784 K)]0.522: [Rescan (parallel)  (Survivor:0chunks) Finished young gen rescan work in 1th thread: 0.000 sec").getBytes());
    DataReader reader = new DataReaderSun1_6_0(new GcResourceFile("byteArray"), in, GcLogType.SUN1_6);
    GCModel model = reader.read();
    assertEquals("GC count", 0, model.size());
}
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