Date datestamp = parseDatestamp(line, pos);
double timestamp = getTimestamp(line, pos, datestamp);
ExtendedType type = parseType(line, pos);
// special provision for CMS events
if (type.getConcurrency() == Concurrency.CONCURRENT) {
ae = new ConcurrentGCEvent();
ConcurrentGCEvent event = (ConcurrentGCEvent)ae;
// simple concurrent events (ending with -start) just are of type GcPattern.GC
event.setDateStamp(datestamp);
event.setTimestamp(timestamp);
event.setExtendedType(type);
if (type.getPattern() == GcPattern.GC_PAUSE_DURATION) {
// the -end events contain a pause and duration as well
int start = pos.getIndex();
int end = line.indexOf('/', pos.getIndex());
event.setPause(NumberParser.parseDouble(line.substring(start, end)));
start = end + 1;
end = line.indexOf(' ', start);
event.setDuration(NumberParser.parseDouble(line.substring(start, end)));
}
// nothing more to parse...
}
else if (type.getCollectionType().equals(CollectionType.VM_OPERATION)) {
ae = new VmOperationEvent();
VmOperationEvent vmOpEvent = (VmOperationEvent) ae;
vmOpEvent.setDateStamp(datestamp);
vmOpEvent.setTimestamp(timestamp);
vmOpEvent.setExtendedType(type);
vmOpEvent.setPause(parsePause(line, pos));
}
else {
ae = new GCEvent();
GCEvent event = (GCEvent) ae;
event.setDateStamp(datestamp);
event.setTimestamp(timestamp);
event.setExtendedType(type);
// now add detail gcevents, should they exist
parseDetailEventsIfExist(line, pos, event);
if (event.getExtendedType().getPattern() == GcPattern.GC_MEMORY_PAUSE
|| event.getExtendedType().getPattern() == GcPattern.GC_MEMORY) {
setMemory(event, line, pos);
}
// then more detail events follow (perm gen is usually here)
parseDetailEventsIfExist(line, pos, event);
if (event.getExtendedType().getPattern() == GcPattern.GC_MEMORY_PAUSE
|| event.getExtendedType().getPattern() == GcPattern.GC_PAUSE) {
event.setPause(parsePause(line, pos));
}
}
return ae;
}
catch (RuntimeException rte) {