@Test
public void testPrintGCDetails() throws Exception {
InputStream in = getInputStream("SampleSun1_4_2PrintGCDetails.txt");
final DataReader reader = new DataReaderSun1_6_0(in, GcLogType.SUN1_4);
GCModel model = reader.read();
/*
0.000: [GC 0.000: [DefNew: 1534K->128K(1664K), 0.0082759 secs] 1534K->276K(16256K), 0.0084272 secs]
11.653: [Full GC 11.653: [Tenured: 5634K->5492K(14592K), 0.2856516 secs] 6560K->5492K(16256K), 0.2858561 secs]
22.879: [GC 22.879: [DefNew: 1855K->125K(1856K), 0.0099038 secs]22.889: [Tenured: 14638K->9916K(14720K), 0.8038262 secs] 16358K->9916K(16576K), 0.8142078 secs]
31.788: [Full GC 31.788: [Tenured: 16141K->13914K(16528K), 0.8032950 secs] 17881K->13914K(18640K), 0.8036514 secs]
*/
AbstractGCEvent<GCEvent> event1 = new GCEvent(0.0d, 1534, 276, 16256, 0.0084272d, AbstractGCEvent.Type.GC);
event1.add(new GCEvent(0.0d, 1534, 128, 1664, 0.0082759d, AbstractGCEvent.Type.DEF_NEW));
AbstractGCEvent<GCEvent> event2 = new GCEvent(11.653d, 6560, 5492, 16256, 0.2858561d, AbstractGCEvent.Type.FULL_GC);
event2.add(new GCEvent(11.653d, 5634, 5492, 14592, 0.2856516d, AbstractGCEvent.Type.TENURED));
AbstractGCEvent<GCEvent> event3 = new GCEvent(22.879d, 16358, 9916, 16576, 0.8142078d, AbstractGCEvent.Type.GC);
event3.add(new GCEvent(22.879d, 1855, 125, 1856, 0.0099038d, AbstractGCEvent.Type.DEF_NEW));
event3.add(new GCEvent(22.889d, 14638, 9916, 14720, 0.8038262d, AbstractGCEvent.Type.TENURED));
AbstractGCEvent<GCEvent> event4 = new GCEvent(31.788d, 17881, 13914, 18640, 0.8036514d, AbstractGCEvent.Type.FULL_GC);
event4.add(new GCEvent(31.788d, 16141, 13914, 16528, 0.8032950d, AbstractGCEvent.Type.TENURED));
assertEquals("model.size()", 4, model.size());
Iterator<AbstractGCEvent<?>> i = model.getStopTheWorldEvents();
AbstractGCEvent<?> event = i.next();
assertEquals("event 1", event1, event);
event = i.next();
assertEquals("event 2", event2, event);
event = i.next();
assertEquals("event 3", event3, event);
event = i.next();
assertEquals("event 4", event4, event);
assertEquals("throughput", 94.133029724, model.getThroughput(), 0.000001);
}