use of com.tagtraum.perf.gcviewer.model.GcResourceFile in project GCViewer by chewiebug.
the class TestDataReaderFactory method testSun1_3_1.
@Test
public void testSun1_3_1() throws Exception {
DataReaderFactory factory = new DataReaderFactory();
DataReader dr = factory.getDataReader(new GcResourceFile("byteArray"), new ByteArrayInputStream("[GC 1087K->462K(16320K), 0.0154134 secs]".getBytes()));
assertDataReader("Sun1_3_1 GC", DataReaderSun1_3_1.class, dr.getClass());
dr = factory.getDataReader(new GcResourceFile("byteArray2"), new ByteArrayInputStream("[Full GC 1087K->462K(16320K), 0.0154134 secs]".getBytes()));
assertDataReader("Sun1_3_1 Full GC", DataReaderSun1_3_1.class, dr.getClass());
}
use of com.tagtraum.perf.gcviewer.model.GcResourceFile in project GCViewer by chewiebug.
the class TestDataReaderFactory method testJRockit1_5GenCon.
@Test
public void testJRockit1_5GenCon() throws Exception {
String fileName = "SampleJRockit1_5_12_gencon.txt";
try (InputStream in = getInputStreamJRockit(fileName)) {
DataReader reader = new DataReaderFactory().getDataReader(new GcResourceFile(fileName), in);
assertDataReader(DataReaderJRockit1_5_0.class, reader.getClass());
}
}
use of com.tagtraum.perf.gcviewer.model.GcResourceFile in project GCViewer by chewiebug.
the class TestDataReaderFactory method testJRockit1_5GenPar.
@Test
public void testJRockit1_5GenPar() throws Exception {
String fileName = "SampleJRockit1_5_12_genpar.txt";
try (InputStream in = getInputStreamJRockit(fileName)) {
DataReader reader = new DataReaderFactory().getDataReader(new GcResourceFile(fileName), in);
assertDataReader(DataReaderJRockit1_5_0.class, reader.getClass());
}
}
use of com.tagtraum.perf.gcviewer.model.GcResourceFile in project GCViewer by chewiebug.
the class TestDataReaderIBM_J9_R28 method testConcurrentMinimal.
@Test
public void testConcurrentMinimal() throws Exception {
// there are minimal concurrent blocks, that don't contain any information, that the parser can use (at least, at the moment)
TestLogHandler handler = new TestLogHandler();
handler.setLevel(Level.WARNING);
GCResource gcResource = new GcResourceFile("SampleIBMJ9_R28_concurrentMinimal.txt");
gcResource.getLogger().addHandler(handler);
DataReader reader = getDataReader(gcResource);
GCModel model = reader.read();
assertThat("model size", model.size(), is(0));
assertThat("number of errors", handler.getCount(), is(0));
}
use of com.tagtraum.perf.gcviewer.model.GcResourceFile in project GCViewer by chewiebug.
the class TestDataReaderIBM_J9_R28 method testConcurrentCollection.
@Test
@Ignore
public void testConcurrentCollection() throws Exception {
TestLogHandler handler = new TestLogHandler();
handler.setLevel(Level.WARNING);
GCResource gcResource = new GcResourceFile("SampleIBMJ9_R28_concurrent_collection.txt");
gcResource.getLogger().addHandler(handler);
DataReader reader = getDataReader(gcResource);
GCModel model = reader.read();
assertThat("model size", model.size(), is(1));
assertThat("duration", model.get(0).getPause(), closeTo(1.182375, 0.00000001));
assertThat("number of errors", handler.getCount(), is(0));
}
Aggregations