private void processGcEvent(GarbageCollectionNotificationInfo info) { GcEvent event = new GcEvent(info, jvmStartTime + info.getGcInfo().getStartTime()); gcLogs.get(info.getGcName()).add(event); if (LOGGER.isDebugEnabled()) { LOGGER.debug(event.toString()); } // Update pause timer for the action and cause... Id eventId = (isConcurrentPhase(info) ? CONCURRENT_PHASE_TIME : PAUSE_TIME) .withTag("action", info.getGcAction()) .withTag("cause", info.getGcCause()); Timer timer = Spectator.globalRegistry().timer(eventId); timer.record(info.getGcInfo().getDuration(), TimeUnit.MILLISECONDS); // Update promotion and allocation counters updateMetrics(info.getGcName(), info.getGcInfo()); // Notify an event listener if registered if (eventListener != null) { try { eventListener.onComplete(event); } catch (Exception e) { LOGGER.warn("exception thrown by event listener", e); } } }
private void processGcEvent(GarbageCollectionNotificationInfo info) { GcEvent event = new GcEvent(info, jvmStartTime + info.getGcInfo().getStartTime()); gcLogs.get(info.getGcName()).add(event); if (LOGGER.isDebugEnabled()) { LOGGER.debug(event.toString()); } // Update pause timer for the action and cause... Id eventId = (isConcurrentPhase(info) ? CONCURRENT_PHASE_TIME : PAUSE_TIME) .withTag("action", info.getGcAction()) .withTag("cause", info.getGcCause()); Timer timer = Spectator.globalRegistry().timer(eventId); timer.record(info.getGcInfo().getDuration(), TimeUnit.MILLISECONDS); // Update promotion and allocation counters updateMetrics(info.getGcName(), info.getGcInfo()); // Notify an event listener if registered if (eventListener != null) { try { eventListener.onComplete(event); } catch (Exception e) { LOGGER.warn("exception thrown by event listener", e); } } }