/** Create serial old detail logging event from log entry. */ public VerboseGcYoungEvent(String logEntry) { this.logEntry = logEntry; Matcher matcher = pattern.matcher(logEntry); if (matcher.find()) { timestamp = JdkMath.convertSecsToMillis(matcher.group(1)).longValue(); combinedBegin = Integer.parseInt(matcher.group(2)); combinedEnd = Integer.parseInt(matcher.group(3)); combinedAllocation = Integer.parseInt(matcher.group(4)); duration = JdkMath.convertSecsToMillis(matcher.group(5)).intValue(); } } // VerboseGcYoungEvent()
/** Create ParNew detail logging event from log entry. */ public TruncatedEvent(CharSequence logEntry) { this.logEntry = logEntry; Matcher matcher = PATTERN_EXTRACT.matcher(logEntry); if (matcher.find()) { timestamp = JdkMath.convertSecsToMillis(matcher.group(1)).longValue(); } else { throw new IllegalArgumentException("log entry did not match " + PATTERN_EXTRACT); } }