protected void addExecution(final DeployedOperation source, final DeployedOperation target) { final ComposedKey<DeployedOperation, DeployedOperation> key = ComposedKey.of(source, target); if (!this.executionModel.getAggregatedInvocations().containsKey(key)) { final AggregatedInvocation invocation = this.factory.createAggregatedInvocation(); invocation.setSource(source); invocation.setTarget(target); this.executionModel.getAggregatedInvocations().put(key, invocation); } }
@Override public IGraph build() { for (final AggregatedInvocation invocation : this.executionModel.getAggregatedInvocations().values()) { this.handleInvocation(invocation); } return this.graph; }
private void handleInvocation(final AggregatedInvocation invocation) { final IVertex sourceVertex = invocation.getSource() != null ? this.addVertex(invocation.getSource()) : this.addVertexForEntry(); // NOCS (declarative) final IVertex targetVertex = this.addVertex(invocation.getTarget()); final long calls = this.statisticsModel.get(invocation).getStatistic(Units.RESPONSE_TIME).getProperty(Properties.COUNT); this.addEdge(sourceVertex, targetVertex, calls); }
public static final Function<OperationCall, Object> createForAggregatedInvocation(final ExecutionModel executionModel) { return operationCall -> { // Check if operationCall is an entry operation call. If so than source is null final DeployedOperation source = operationCall.getParent() != null ? operationCall.getParent().getOperation() : null; // NOCS (declarative) final DeployedOperation target = operationCall.getOperation(); final ComposedKey<DeployedOperation, DeployedOperation> key = ComposedKey.of(source, target); return executionModel.getAggregatedInvocations().get(key); }; }
.getExecutionModel().getAggregatedInvocations();