Skip to content
Snippets Groups Projects
Commit 50a2ab04 authored by Sören Henning's avatar Sören Henning
Browse files

add dot trace styling

parent 5418175a
No related branches found
No related tags found
1 merge request!17Get impletemented stages and Java 8
Pipeline #
......@@ -74,19 +74,23 @@ public class TraceAnalysisConfiguration extends Configuration {
String graphFilesOutputDir = "example/event monitoring log/output"; // TODO Temp hard coded
TraceTraverserStage traceTraverserStage = new TraceTraverserStage();
final Distributor<Graph> graphDistributor = new Distributor<>(new CopyByReferenceStrategy());
final Distributor<Graph> graphDistributor = new Distributor<>(new CopyByReferenceStrategy());// TODO use clone
GraphMLFileWriterComposite graphMLFileWriterComposite = new GraphMLFileWriterComposite(graphFilesOutputDir);
// DotTraceStyleStage dotTraceStyleStage = new DotTraceStyleStage();
DotFileWriterStage dotFileWriterStage = new DotFileWriterStage(graphFilesOutputDir);
super.connectPorts(distributor.getNewOutputPort(), traceTraverserStage.getInputPort());
super.connectPorts(traceTraverserStage.getOutputPort(), graphDistributor.getInputPort());
super.connectPorts(graphDistributor.getNewOutputPort(), graphMLFileWriterComposite.getInputPort());
super.connectPorts(graphDistributor.getNewOutputPort(), dotFileWriterStage.getInputPort());
// super.connectPorts(graphDistributor.getNewOutputPort(), dotTraceStyleStage.getInputPort());
// super.connectPorts(dotTraceStyleStage.getOutputPort(), dotFileWriterStage.getInputPort());
final Distributor<AggregatedTrace> aggregatedTraceDistributor = new Distributor<>(new CopyByReferenceStrategy());
AggrTraceTraverserStage aggrTraceTraverser = new AggrTraceTraverserStage();
final Distributor<Graph> graphDistributor2 = new Distributor<>(new CopyByReferenceStrategy());
final Distributor<Graph> graphDistributor2 = new Distributor<>(new CopyByReferenceStrategy()); // TODO use clone
GraphMLFileWriterComposite graphMLFileWriterComposite2 = new GraphMLFileWriterComposite(graphFilesOutputDir);
// DotTraceStyleStage dotAggrTraceStyleStage = new DotTraceStyleStage();
DotFileWriterStage dotFileWriterStage2 = new DotFileWriterStage(graphFilesOutputDir);
super.connectPorts(aggregation.getOutputPort(), aggregatedTraceDistributor.getInputPort());
......@@ -95,6 +99,8 @@ public class TraceAnalysisConfiguration extends Configuration {
super.connectPorts(aggrTraceTraverser.getOutputPort(), graphDistributor2.getInputPort());
super.connectPorts(graphDistributor2.getNewOutputPort(), graphMLFileWriterComposite2.getInputPort());
super.connectPorts(graphDistributor2.getNewOutputPort(), dotFileWriterStage2.getInputPort());
// super.connectPorts(graphDistributor2.getNewOutputPort(), dotAggrTraceStyleStage.getInputPort());
// super.connectPorts(dotAggrTraceStyleStage.getOutputPort(), dotFileWriterStage2.getInputPort());
// DependencyCreatorStage dependencyCreatorStage = new DependencyCreatorStage();
// DependencyStatisticsDecoratorStage dependencyStatisticsDecoratorStage = new DependencyStatisticsDecoratorStage();
......
package kieker.analysis.trace.graphoutput;
import java.util.HashMap;
import java.util.Map;
import kieker.analysis.util.graph.Graph;
import kieker.analysis.util.graph.export.dot.DotExportPropertyTokens;
import teetime.stage.basic.AbstractTransformation;
public class DotTraceStyleStage extends AbstractTransformation<Graph, Graph> {
private final Map<String, String> nodeStyling = new HashMap<>();
public DotTraceStyleStage() {
super();
nodeStyling.put("shape", "none");
}
@Override
protected void execute(final Graph graph) {
graph.setProperty(DotExportPropertyTokens.DEFAULT_NODE_PROPERTIES, nodeStyling);
this.getOutputPort().send(graph);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment