Search in sources :

Example 41 with GcResourceFile

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

the class TestDataReaderFactory method testJRockit1_5GenConMemStats.

@Test
public void testJRockit1_5GenConMemStats() throws Exception {
    String fileName = "SampleJRockit1_5_20_memstats2.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 42 with GcResourceFile

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

the class TestDataReaderFactory method testIBMJ9_R26.

@Test
public void testIBMJ9_R26() throws Exception {
    String fileName = "SampleIBMJ9_R26_GAFP1_full_header.txt";
    try (InputStream in = getInputStreamIBM(fileName)) {
        DataReader reader = new DataReaderFactory().getDataReader(new GcResourceFile(fileName), in);
        assertDataReader(DataReaderIBM_J9_R28.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 43 with GcResourceFile

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

the class TestDataReaderFactory method testJRockit1_4GenCon.

@Test
public void testJRockit1_4GenCon() throws Exception {
    String fileName = "SampleJRockit1_4_2gencon.txt";
    try (InputStream in = getInputStreamJRockit(fileName)) {
        DataReader reader = new DataReaderFactory().getDataReader(new GcResourceFile(fileName), in);
        assertDataReader(DataReaderJRockit1_5_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 44 with GcResourceFile

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

the class TestDataReaderFactory method testSun1_4_0.

@Test
public void testSun1_4_0() throws Exception {
    // although the input is java 1.4 the datareader returned should be 1.6
    // (DataReaderSun1_6_0 handles java 1.4, 1.5, 1.6, 1.7)
    DataReaderFactory factory = new DataReaderFactory();
    DataReader dr = factory.getDataReader(new GcResourceFile("byteArray"), new ByteArrayInputStream("2.23492e-006: [GC 1087K->462K(16320K), 0.0154134 secs]".getBytes()));
    assertDataReader(DataReaderSun1_6_0.class, dr.getClass());
}
Also used : ByteArrayInputStream(java.io.ByteArrayInputStream) GcResourceFile(com.tagtraum.perf.gcviewer.model.GcResourceFile) Test(org.junit.Test)

Example 45 with GcResourceFile

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

the class TestDataReaderFactory method testJRockit1_5SimpleOpts.

@Test
public void testJRockit1_5SimpleOpts() throws Exception {
    String fileName = "SampleJRockit1_5_12-gcreport-simpleopts-singlecon.txt";
    try (InputStream in = getInputStreamJRockit(fileName)) {
        DataReader reader = new DataReaderFactory().getDataReader(new GcResourceFile(fileName), in);
        assertDataReader(DataReaderJRockit1_5_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)

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