use of com.tagtraum.perf.gcviewer.model.ConcurrentGCEvent in project GCViewer by chewiebug.
the class SimpleGcWriterTest method setUp.
@Before
public void setUp() throws Exception {
// 0.677: [GC 0.677: [ParNew: 118010K->13046K(118016K), 0.0299506 secs] 175499K->104936K(249088K), 0.0300629 secs] [Times: user=0.06 sys=0.06, real=0.03 secs]
// 0.708: [GC [1 CMS-initial-mark: 91890K(131072K)] 109176K(249088K), 0.0004006 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
// 0.708: [CMS-concurrent-mark-start]
// 0.714: [CMS-concurrent-mark: 0.006/0.006 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]
// 0.714: [CMS-concurrent-preclean-start]
// 0.715: [CMS-concurrent-preclean: 0.001/0.001 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
// 0.715: [CMS-concurrent-abortable-preclean-start]
// 0.769: [GC 0.769: [ParNew: 118006K->118006K(118016K), 0.0000176 secs]0.769: [CMS0.769: [CMS-concurrent-abortable-preclean: 0.001/0.055 secs] [Times: user=0.02 sys=0.00, real=0.06 secs]
// (concurrent mode failure): 91890K->20323K(131072K), 0.0186232 secs] 209896K->20323K(249088K), [CMS Perm : 2561K->2560K(21248K)], 0.0187293 secs] [Times: user=0.01 sys=0.00, real=0.02 secs]
// 0.877: [GC 0.877: [ParNew: 104960K->13040K(118016K), 0.0256080 secs] 125283K->78706K(249088K), 0.0256748 secs] [Times: user=0.08 sys=0.00, real=0.03 secs]
GCEvent gcEvent = new GCEvent(0.677, 175499, 104936, 249088, 0.0300629, AbstractGCEvent.Type.GC);
GCEvent parNew = new GCEvent(0.677, 118010, 13046, 118016, 0.0299506, AbstractGCEvent.Type.PAR_NEW);
gcEvent.add(parNew);
GCEvent gcEvent2 = new GCEvent(0.708, 109176, 109176, 249088, 0.0004006, AbstractGCEvent.Type.GC);
GCEvent initialMark = new GCEvent(0.708, 91890, 91890, 131072, 0, AbstractGCEvent.Type.CMS_INITIAL_MARK);
gcEvent2.add(initialMark);
ConcurrentGCEvent concGCEvent = new ConcurrentGCEvent();
concGCEvent.setTimestamp(0.708);
concGCEvent.setType(AbstractGCEvent.Type.CMS_CONCURRENT_MARK_START);
gcModel = new GCModel();
gcModel.add(gcEvent);
gcModel.add(gcEvent2);
gcModel.add(concGCEvent);
}
use of com.tagtraum.perf.gcviewer.model.ConcurrentGCEvent in project GCViewer by chewiebug.
the class ConcurrentGcBegionEndRenderer method paintComponent.
public void paintComponent(Graphics2D g2d) {
// make sure that we ignore the AntiAliasing flag as it does not make sense for vertical lines
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
final double scaleFactor = getModelChart().getScaleFactor();
final int height = getHeight();
int lastScaledTimestampBegin = Integer.MIN_VALUE;
int lastScaledTimestampEnd = Integer.MIN_VALUE;
for (Iterator<ConcurrentGCEvent> i = getModelChart().getModel().getConcurrentGCEvents(); i.hasNext(); ) {
final ConcurrentGCEvent event = i.next();
if (event.isConcurrentCollectionStart()) {
final int scaledTimestamp = (int) (scaleFactor * (event.getTimestamp() - getModelChart().getModel().getFirstPauseTimeStamp()));
if (scaledTimestamp != lastScaledTimestampBegin) {
g2d.setPaint(CONCURRENT_COLLECTION_BEGIN);
g2d.drawLine(scaledTimestamp, 0, scaledTimestamp, height);
lastScaledTimestampBegin = scaledTimestamp;
}
} else if (event.isConcurrentCollectionEnd()) {
final int scaledTimestamp = (int) (scaleFactor * (event.getTimestamp() - getModelChart().getModel().getFirstPauseTimeStamp()));
if (scaledTimestamp != lastScaledTimestampEnd) {
g2d.setPaint(CONCURRENT_COLLECTION_END);
g2d.drawLine(scaledTimestamp, 0, scaledTimestamp, height);
lastScaledTimestampEnd = scaledTimestamp;
}
}
}
}
Aggregations