/** * This method represents the input port receiving trace events to be selected by a specific timestamp selector (based on tin and tout). * * @param execution * The new incoming execution object. */ @InputPort(name = INPUT_PORT_NAME_EXECUTION, description = "Receives trace events to be selected by a specific timestamp selector (based on tin and tout)", eventTypes = { OperationExecutionRecord.class }) public final void inputOperationExecutionRecord(final OperationExecutionRecord execution) { if (this.inRange(execution.getTin()) && this.inRange(execution.getTout())) { super.deliver(OUTPUT_PORT_NAME_WITHIN_PERIOD, execution); } else { super.deliver(OUTPUT_PORT_NAME_OUTSIDE_PERIOD, execution); } } }
@InputPort(name = INPUT_PORT_NAME_COMBINED, description = "Receives records to be selected by timestamps, based on type-specific selectors", eventTypes = { IMonitoringRecord.class }) public void inputCombined(final IMonitoringRecord record) { if (record instanceof OperationExecutionRecord) { this.inputOperationExecutionRecord((OperationExecutionRecord) record); } else if (record instanceof IEventRecord) { this.inputTraceEvent((IEventRecord) record); } else { this.inputIMonitoringRecord(record); } }
final TimestampFilter timestampFilter = new TimestampFilter(timestampFilterConfiguration, analysisInstance);
/** * Creates a {@link TimestampFilter} with the given properties * using the constructor {@link TimestampFilter#TimestampFilter(kieker.common.configuration.Configuration, java.util.Map)}. * * @param ignoreExecutionsBeforeTimestamp * @param ignoreExecutionsAfterTimestamp * @return * @throws AnalysisConfigurationException * If the internally assembled analysis configuration is somehow invalid. * @throws IllegalStateException * If the internal analysis is in an invalid state. */ private void createTimestampFilter(final long ignoreExecutionsBeforeTimestamp, final long ignoreExecutionsAfterTimestamp) throws IllegalStateException, AnalysisConfigurationException { final Configuration cfg = new Configuration(); cfg.setProperty(TimestampFilter.CONFIG_PROPERTY_NAME_IGNORE_BEFORE_TIMESTAMP, Long.toString(ignoreExecutionsBeforeTimestamp)); cfg.setProperty(TimestampFilter.CONFIG_PROPERTY_NAME_IGNORE_AFTER_TIMESTAMP, Long.toString(ignoreExecutionsAfterTimestamp)); final TimestampFilter filter = new TimestampFilter(cfg, this.controller); this.controller.connect(this.reader, ListReader.OUTPUT_PORT_NAME, filter, TimestampFilter.INPUT_PORT_NAME_FLOW); this.controller.connect(filter, TimestampFilter.OUTPUT_PORT_NAME_WITHIN_PERIOD, this.sinkPlugin, ListCollectionFilter.INPUT_PORT_NAME); }
private TimestampFilter createTimestampFilter(final ThreadEvent2TraceEventFilter sourceStage) throws IllegalStateException, AnalysisConfigurationException { // Create the timestamp filter and connect to the reader's output port final Configuration configTimestampFilter = new Configuration(); configTimestampFilter.setProperty(TimestampFilter.CONFIG_PROPERTY_NAME_IGNORE_BEFORE_TIMESTAMP, this.longToString(this.settings.getIgnoreExecutionsBeforeDate())); configTimestampFilter.setProperty(TimestampFilter.CONFIG_PROPERTY_NAME_IGNORE_AFTER_TIMESTAMP, this.longToString(this.settings.getIgnoreExecutionsAfterDate())); final TimestampFilter timestampFilter = new TimestampFilter(configTimestampFilter, this.analysisController); this.analysisController.connect(sourceStage, ThreadEvent2TraceEventFilter.OUTPUT_PORT_NAME_DEFAULT, timestampFilter, TimestampFilter.INPUT_PORT_NAME_EXECUTION); this.analysisController.connect(sourceStage, ThreadEvent2TraceEventFilter.OUTPUT_PORT_NAME_DEFAULT, timestampFilter, TimestampFilter.INPUT_PORT_NAME_FLOW); return timestampFilter; }
@InputPort(name = INPUT_PORT_NAME_COMBINED, description = "Receives records to be selected by timestamps, based on type-specific selectors", eventTypes = { IMonitoringRecord.class }) public void inputCombined(final IMonitoringRecord record) { if (record instanceof OperationExecutionRecord) { this.inputOperationExecutionRecord((OperationExecutionRecord) record); } else if (record instanceof IEventRecord) { this.inputTraceEvent((IEventRecord) record); } else { this.inputIMonitoringRecord(record); } }
/** * This method represents the input port receiving trace events to be selected * by a specific timestamp selector (based on tin and tout). * * @param execution * The new incoming execution object. */ @InputPort(name = INPUT_PORT_NAME_EXECUTION, description = "Receives trace events to be selected by a specific timestamp selector (based on tin and tout)", eventTypes = { OperationExecutionRecord.class }) public final void inputOperationExecutionRecord(final OperationExecutionRecord execution) { if (this.inRange(execution.getTin()) && this.inRange(execution.getTout())) { super.deliver(OUTPUT_PORT_NAME_WITHIN_PERIOD, execution); } else { super.deliver(OUTPUT_PORT_NAME_OUTSIDE_PERIOD, execution); } } }
final TimestampFilter timestampFilter = new TimestampFilter(timestampFilterConfiguration, analysisInstance);
@InputPort(name = INPUT_PORT_NAME_ANY_RECORD, description = "Receives records to be selected by their logging timestamps", eventTypes = { IMonitoringRecord.class }) public final void inputIMonitoringRecord(final IMonitoringRecord record) { if (this.inRange(record.getLoggingTimestamp())) { super.deliver(OUTPUT_PORT_NAME_WITHIN_PERIOD, record); } else { super.deliver(OUTPUT_PORT_NAME_OUTSIDE_PERIOD, record); } }
Long.toString(this.ignoreExecutionsAfterTimestamp)); timestampFilter = new TimestampFilter(configTimestampFilter, this.analysisController); this.analysisController.connect(sourceStage, sourcePort, timestampFilter, TimestampFilter.INPUT_PORT_NAME_EXECUTION);
@InputPort(name = INPUT_PORT_NAME_ANY_RECORD, description = "Receives records to be selected by their logging timestamps", eventTypes = { IMonitoringRecord.class }) public final void inputIMonitoringRecord(final IMonitoringRecord record) { if (this.inRange(record.getLoggingTimestamp())) { super.deliver(OUTPUT_PORT_NAME_WITHIN_PERIOD, record); } else { super.deliver(OUTPUT_PORT_NAME_OUTSIDE_PERIOD, record); } }
final TimestampFilter timestampFilter = new TimestampFilter(confTimestampFilter, analysisController);
/** * This method represents the input port receiving trace events to be selected by a specific timestamp selector. * * @param record * The new incoming record. */ @InputPort(name = INPUT_PORT_NAME_FLOW, description = "Receives trace events to be selected by a specific timestamp selector", eventTypes = { IEventRecord.class, TraceMetadata.class }) public final void inputTraceEvent(final IFlowRecord record) { final long timestamp; if (record instanceof TraceMetadata) { timestamp = ((TraceMetadata) record).getLoggingTimestamp(); } else if (record instanceof IEventRecord) { timestamp = ((IEventRecord) record).getTimestamp(); } else { // should not happen given the accepted type return; } if (this.inRange(timestamp)) { super.deliver(OUTPUT_PORT_NAME_WITHIN_PERIOD, record); } else { super.deliver(OUTPUT_PORT_NAME_OUTSIDE_PERIOD, record); } }
/** * This method represents the input port receiving trace events to be selected * by a specific timestamp selector. * * @param record * The new incoming record. */ @InputPort(name = INPUT_PORT_NAME_FLOW, description = "Receives trace events to be selected by a specific timestamp selector", eventTypes = { IEventRecord.class, TraceMetadata.class }) public final void inputTraceEvent(final IFlowRecord record) { final long timestamp; if (record instanceof TraceMetadata) { timestamp = ((TraceMetadata) record).getLoggingTimestamp(); } else if (record instanceof IEventRecord) { timestamp = ((IEventRecord) record).getTimestamp(); } else { // should not happen given the accepted type return; } if (this.inRange(timestamp)) { super.deliver(OUTPUT_PORT_NAME_WITHIN_PERIOD, record); } else { super.deliver(OUTPUT_PORT_NAME_OUTSIDE_PERIOD, record); } }