use of com.tagtraum.perf.gcviewer.model.GCModel in project GCViewer by chewiebug.
the class TestDataReaderIBM1_3_1 method testParse1.
@Test
public void testParse1() throws Exception {
String fileName = "SampleIBM1_3_1.txt";
InputStream in = UnittestHelper.getResourceAsStream(UnittestHelper.FOLDER_IBM, fileName);
DataReader reader = new DataReaderIBM1_3_1(new GcResourceFile(fileName), in);
GCModel model = reader.read();
assertEquals("number of events", 21, model.size());
}
use of com.tagtraum.perf.gcviewer.model.GCModel in project GCViewer by chewiebug.
the class TestDataReaderIBM1_4_2 method testParse1.
@Test
public void testParse1() throws Exception {
String fileName = "SampleIBM1_4_2.txt";
final InputStream in = UnittestHelper.getResourceAsStream(UnittestHelper.FOLDER_IBM, fileName);
final DataReader reader = new DataReaderIBM1_4_2(new GcResourceFile(fileName), in);
GCModel model = reader.read();
assertEquals("number of events", 2884, model.size());
}
use of com.tagtraum.perf.gcviewer.model.GCModel in project GCViewer by chewiebug.
the class TestDataReaderIBMJ9_5_0 method afTenuredGlobal.
@Test
public void afTenuredGlobal() throws Exception {
final DataReader reader = getDataReader("SampleIBMJ9_5_0af-global-200811_07.txt");
GCModel model = reader.read();
assertEquals("count", 1, model.size());
GCEvent event = (GCEvent) model.get(0);
assertEquals("pause", 0.035912, event.getPause(), 0.0000001);
assertEquals("timestamp", 0, event.getTimestamp(), 0.000001);
assertEquals("name", Type.FULL_GC.getName(), event.getExtendedType().getName());
assertEquals("before", (52428800 - 2621440) / 1024, event.getPreUsed());
assertEquals("after", (52428800 - 40481192) / 1024, event.getPostUsed());
assertEquals("total", 52428800 / 1024, event.getTotal());
}
use of com.tagtraum.perf.gcviewer.model.GCModel in project GCViewer by chewiebug.
the class TestDataReaderIBMJ9_5_0 method afTenuredGlobal_20090417_AA.
@Test
public void afTenuredGlobal_20090417_AA() throws Exception {
final DataReader reader = getDataReader("SampleIBMJ9_5_0af-global-20090417_AA.txt");
GCModel model = reader.read();
assertEquals("count", 1, model.size());
GCEvent event = (GCEvent) model.get(0);
assertEquals("pause", 0.837024, event.getPause(), 0.0000001);
assertEquals("timestamp", 0, event.getTimestamp(), 0.000001);
assertEquals("name", Type.FULL_GC.getName(), event.getExtendedType().getName());
assertEquals("before", (12884901888L - 4626919608L) / 1024, event.getPreUsed());
assertEquals("after", (12884901888L - 10933557088L) / 1024, event.getPostUsed());
assertEquals("total", 12884901888L / 1024, event.getTotal());
}
use of com.tagtraum.perf.gcviewer.model.GCModel in project GCViewer by chewiebug.
the class TestDataReaderIBM_J9_R26 method testFullHeaderWithAfGcs.
@Test
public void testFullHeaderWithAfGcs() throws Exception {
TestLogHandler handler = new TestLogHandler();
handler.setLevel(Level.WARNING);
GCResource gcResource = new GcResourceFile("SampleIBMJ9_R26_GAFP1_full_header.txt");
gcResource.getLogger().addHandler(handler);
DataReader reader = getDataReader(gcResource);
GCModel model = reader.read();
assertThat("model size", model.size(), is(1));
GCEvent event = (GCEvent) model.get(0);
assertThat("pause", event.getPause(), closeTo(0.00529, 0.0000001));
assertThat("number of errors", handler.getCount(), is(1));
}
Aggregations