Search in sources :

Example 1 with EventBasedTrace

use of teetime.stage.trace.traceReconstruction.EventBasedTrace in project iobserve-analysis by research-iobserve.

the class AnalysisConfiguration method traceProcessing.

/**
 * Create trace related filter chains.
 *
 * @param configuration
 *            filter configurations
 * @throws ConfigurationException
 *             when configuration fails
 */
private void traceProcessing(final kieker.common.configuration.Configuration configuration) throws ConfigurationException {
    if (configuration.getBooleanProperty(ConfigurationKeys.TRACES, false)) {
        final TraceReconstructionCompositeStage traceReconstructionStage = new TraceReconstructionCompositeStage(configuration);
        OutputPort<EventBasedTrace> behaviorClusteringEventBasedTracePort = traceReconstructionStage.getTraceValidOutputPort();
        OutputPort<EventBasedTrace> dataFlowEventBasedTracePort = traceReconstructionStage.getTraceValidOutputPort();
        /**
         * Connect ports.
         */
        this.eventDispatcher.registerOutput(IFlowRecord.class);
        this.connectPorts(this.eventDispatcher.getOutputPort(IFlowRecord.class), traceReconstructionStage.getInputPort());
        /**
         * Include distributor to support tow simultaneous sinks.
         */
        if (configuration.getBooleanProperty(ConfigurationKeys.DATA_FLOW, false) && !configuration.getStringProperty(ConfigurationKeys.BEHAVIOR_CLUSTERING).isEmpty()) {
            final IDistributorStrategy strategy = new CopyByReferenceStrategy();
            final Distributor<EventBasedTrace> distributor = new Distributor<>(strategy);
            this.connectPorts(traceReconstructionStage.getTraceValidOutputPort(), distributor.getInputPort());
            behaviorClusteringEventBasedTracePort = distributor.getNewOutputPort();
            dataFlowEventBasedTracePort = distributor.getNewOutputPort();
        }
        /**
         * Initialize depending features.
         */
        this.behaviorClustering(configuration, behaviorClusteringEventBasedTracePort);
        this.dataflow(configuration, dataFlowEventBasedTracePort);
    }
}
Also used : Distributor(teetime.stage.basic.distributor.Distributor) TraceReconstructionCompositeStage(org.iobserve.analysis.traces.TraceReconstructionCompositeStage) EventBasedTrace(teetime.stage.trace.traceReconstruction.EventBasedTrace) IFlowRecord(kieker.common.record.flow.IFlowRecord) IDistributorStrategy(teetime.stage.basic.distributor.strategy.IDistributorStrategy) CopyByReferenceStrategy(teetime.stage.basic.distributor.strategy.CopyByReferenceStrategy)

Aggregations

IFlowRecord (kieker.common.record.flow.IFlowRecord)1 TraceReconstructionCompositeStage (org.iobserve.analysis.traces.TraceReconstructionCompositeStage)1 Distributor (teetime.stage.basic.distributor.Distributor)1 CopyByReferenceStrategy (teetime.stage.basic.distributor.strategy.CopyByReferenceStrategy)1 IDistributorStrategy (teetime.stage.basic.distributor.strategy.IDistributorStrategy)1 EventBasedTrace (teetime.stage.trace.traceReconstruction.EventBasedTrace)1