@Override protected final void cleanup() { if (LOG.isDebugEnabled()) { LOG.debug("Shutting down TimeSource Controller"); } }
@Override protected final void cleanup() { if (LOG.isDebugEnabled()) { LOG.debug("Shutting down Sampling Controller"); } if (this.periodicSensorsPoolExecutor != null) { this.periodicSensorsPoolExecutor.shutdown(); } }
/** * Sets the pipe reader to a new value. The pipe reader will be informed about new records. * * @param pipeReader * The new pipe reader. */ public void setPipeReader(final IPipeReader pipeReader) { this.pipeReader = pipeReader; if (LOG.isDebugEnabled()) { LOG.debug("PipeReader initialized"); } }
@Override protected final void cleanup() { if (LOG.isDebugEnabled()) { LOG.debug("Shutting down State Controller"); } }
@Override protected void cleanup() { if (LOG.isDebugEnabled()) { LOG.debug("Shutting down Probe Controller"); } }
private void close(final ServerSocketChannel serversocket) { try { serversocket.close(); } catch (final IOException e) { if (this.log.isDebugEnabled()) { this.log.debug("Failed to close TCP connection!", e); } } }
@Override public void printStatusMessage() { synchronized (this) { super.printStatusMessage(); if (LOG.isDebugEnabled()) { LOG.debug("Saved " + this.numGraphsSaved + " call tree" + (this.numGraphsSaved > 1 ? "s" : "")); // NOCS } } }
@Override protected final void init() { if (LOG.isDebugEnabled()) { LOG.debug("Initializing Writer Controller"); } if (this.monitoringWriterThread != null) { this.monitoringWriterThread.start(); } }
@Override public void run() { if (LOG.isDebugEnabled()) { LOG.debug(this.getClass().getName() + " is running."); } this.writer.onStarting(); try { IMonitoringRecord record = this.writerQueue.take(); while (record != END_OF_MONITORING_RECORD) { // NOPMD (compare references by == not by equals()) this.writer.writeMonitoringRecord(record); record = this.writerQueue.take(); } } catch (final InterruptedException e) { if (LOG.isDebugEnabled()) { LOG.debug(this.getClass().getName() + " was interrupted.", e); } // do nothing; the thread terminates itself } this.writer.onTerminating(); if (LOG.isDebugEnabled()) { LOG.debug(this.getClass().getName() + " has finished."); } }
@Override protected final void cleanup() { if (LOG.isDebugEnabled()) { LOG.debug("Shutting down Writer Controller"); } if (this.monitoringWriterThread != null) { this.monitoringWriterThread.terminate(); } // if (this.disruptor != null) { // this.disruptor.shutdown(); // } // LOG.info("block durations: {}" + this.insertBehavior.toString()); // System.out.println("block durations: " + this.insertBehavior.toString()); }
@Override public void printStatusMessage() { synchronized (this) { super.printStatusMessage(); if ((this.getSuccessCount() > 0) || (this.getErrorCount() > 0)) { final String minTinStr = new StringBuilder().append(this.minTin).append(" (") .append(LoggingTimestampConverter.convertLoggingTimestampToUTCString(this.timeunit.toNanos(this.minTin))).append(",") .append(LoggingTimestampConverter.convertLoggingTimestampLocalTimeZoneString(this.minTin)).append(")").toString(); final String maxToutStr = new StringBuilder().append(this.maxTout).append(" (") .append(LoggingTimestampConverter.convertLoggingTimestampToUTCString(this.timeunit.toNanos(this.maxTout))).append(",") .append(LoggingTimestampConverter.convertLoggingTimestampLocalTimeZoneString(this.maxTout)).append(")").toString(); if (LOG.isDebugEnabled()) { LOG.debug("First timestamp: " + minTinStr); LOG.debug("Last timestamp: " + maxToutStr); } } } }
@Override public void printStatusMessage() { super.printStatusMessage(); final int numTraces = this.getSuccessCount(); if (LOG.isDebugEnabled()) { LOG.debug("Wrote " + numTraces + " execution trace artifact" + (numTraces > 1 ? "s" : "") + " to file '" + this.outputFn + "'"); // NOCS } }
@Override public void printStatusMessage() { super.printStatusMessage(); final int numTraces = this.getSuccessCount(); if (LOG.isDebugEnabled()) { LOG.debug("Wrote " + numTraces + " execution trace" + (numTraces > 1 ? "s" : "") + " to file '" + this.outputFn + "'"); // NOCS } }
@Override public void printStatusMessage() { super.printStatusMessage(); final int numTraces = this.getSuccessCount(); if (LOG.isDebugEnabled()) { LOG.debug("Wrote " + numTraces + " trace" + (numTraces > 1 ? "s" : "") + " to file '" + this.outputFn + "'"); // NOCS } }
/** * Registers the given filter with this analysis instance. <b>This method is for internal use only!</b> * * @param filter * The filter to register with this analysis. * * @throws IllegalStateException * If the analysis has already been started when this method is called. */ public final void registerFilter(final AbstractFilterPlugin filter) throws IllegalStateException { if (this.state != STATE.READY) { throw new IllegalStateException("Unable to register filter after starting analysis."); } if (this.filters.contains(filter)) { LOG.warn("Filter '" + filter.getName() + "' (" + filter.getPluginName() + ") already registered."); return; } this.filters.add(filter); if (LOG.isDebugEnabled()) { LOG.debug("Registered plugin " + filter); } }
/** * Registers the given repository with this analysis instance. <b>This method is for internal use only!</b> * * @param repository * The repository to register with this analysis. * * @throws IllegalStateException * If the analysis has already been started when this method is called. */ public final void registerRepository(final AbstractRepository repository) throws IllegalStateException { if (this.state != STATE.READY) { throw new IllegalStateException("Unable to register respository after starting analysis."); } if (this.repos.contains(repository)) { LOG.warn("Repository '" + repository.getName() + "' (" + repository.getRepositoryName() + ") already registered."); return; } this.repos.add(repository); if (LOG.isDebugEnabled()) { LOG.debug("Registered repository '" + repository.getName() + "' (" + repository.getRepositoryName() + ")"); } }
/** * Prints a debug message to the logger. The output is prepended by a header which includes the name of this plugin instance. * * @param lines * The lines to be printed. */ protected void printDebugLogMessage(final String[] lines) { if (LOG.isDebugEnabled()) { LOG.debug(""); LOG.debug("#"); LOG.debug("# Plugin: " + this.getName()); for (final String l : lines) { LOG.debug(l); } } }
@Override protected boolean performTask() { if (LOG.isDebugEnabled()) { if (this.realtimeMode) { LOG.debug("Replaying log data in real time"); } else { LOG.debug("Replaying log data in non-real time"); } } final FilesystemLogReplayer player = new FilesystemLogReplayer(this.monitoringConfigurationFile, this.realtimeMode, this.realtimeAccelerationFactor, this.keepOriginalLoggingTimestamps, this.numRealtimeWorkerThreads, this.ignoreRecordsBeforeTimestamp, this.ignoreRecordsAfterTimestamp, this.inputDirs); if (player.replay()) { return true; } else { LOG.error("An error occured"); return false; } }
@Override public void printStatusMessage() { synchronized (this) { super.printStatusMessage(); final int numPlots = this.getSuccessCount(); final long lastSuccessTracesId = this.getLastTraceIdSuccess(); if (LOG.isDebugEnabled()) { LOG.debug("Wrote " + numPlots + " call tree" + (numPlots > 1 ? "s" : "") + " to file" + (numPlots > 1 ? "s" : "") + " with name pattern '" // NOCS + this.dotOutputFn + "-<traceId>.dot'"); LOG.debug("Dot files can be converted using the dot tool"); LOG.debug("Example: dot -T svg " + this.dotOutputFn + "-" + ((numPlots > 0) ? lastSuccessTracesId : "<traceId>") + ".dot > " // NOCS + this.dotOutputFn + "-" + ((numPlots > 0) ? lastSuccessTracesId : "<traceId>") + ".svg"); // NOCS } } }
/** * {@inheritDoc} */ @Override public void printStatusMessage() { super.printStatusMessage(); final int numPlots = this.getSuccessCount(); final long lastSuccessTracesId = this.getLastTraceIdSuccess(); if (LOG.isDebugEnabled()) { LOG.debug("Wrote " + numPlots + " sequence diagram" + (numPlots > 1 ? "s" : "") // NOCS (AvoidInlineConditionalsCheck) + " to file" + (numPlots > 1 ? "s" : "") + " with name pattern '" + this.outputFnBase + "-<traceId>.pic'"); // NOCS // (AvoidInlineConditionalsCheck) LOG.debug("Pic files can be converted using the pic2plot tool (package plotutils)"); LOG.debug("Example: pic2plot -T svg " + this.outputFnBase + "-" + ((numPlots > 0) ? lastSuccessTracesId : "<traceId>") // NOCS (AvoidInlineConditionalsCheck) + ".pic > " + this.outputFnBase + "-" + ((numPlots > 0) ? lastSuccessTracesId : "<traceId>") + ".svg"); // NOCS (AvoidInlineConditionalsCheck) } }