public Collection<V> values() { return Collections.unmodifiableCollection(eMap.values()); }
public void print(final DeploymentModel model) { for (final DeploymentContext deploymentContext : model.getDeploymentContexts().values()) { this.printDeploymentContext(deploymentContext); for (final DeployedComponent component : deploymentContext.getComponents().values()) { this.printComponent(component); for (final DeployedOperation operation : component.getContainedOperations().values()) { this.printOperation(operation); } } } }
@Override public IGraph build() { for (final AggregatedInvocation invocation : this.executionModel.getAggregatedInvocations().values()) { this.handleInvocation(invocation); } return this.graph; }
/** * Prepares this ChangeRecorder's {@link #changeDescription} for the scenarios where the user * is resuming a previous recording. * @see #beginRecording(ChangeDescription, Collection) * @since 2.1.0 */ protected void prepareChangeDescriptionForResume() { loadingTargets = true; ChangeDescription changeDescription = getChangeDescription(); for (Notifier notifier : changeDescription.getObjectsToAttach()) { addAdapter(notifier); } loadingTargets = false; changeDescription.getObjectsToAttach().clear(); // Make sure that all the old values are cached. for (List<FeatureChange> featureChanges : changeDescription.getObjectChanges().values()) { for (FeatureChange featureChange : featureChanges) { featureChange.getValue(); } } for (ResourceChange resourceChange : changeDescription.getResourceChanges()) { resourceChange.getValue(); } }
/** * Prepares this ChangeRecorder's {@link #changeDescription} for the scenarios where the user * is resuming a previous recording. * @see #beginRecording(ChangeDescription, Collection) * @since 2.1.0 */ protected void prepareChangeDescriptionForResume() { loadingTargets = true; ChangeDescription changeDescription = getChangeDescription(); for (Notifier notifier : changeDescription.getObjectsToAttach()) { addAdapter(notifier); } loadingTargets = false; changeDescription.getObjectsToAttach().clear(); // Make sure that all the old values are cached. for (List<FeatureChange> featureChanges : changeDescription.getObjectChanges().values()) { for (FeatureChange featureChange : featureChanges) { featureChange.getValue(); } } for (ResourceChange resourceChange : changeDescription.getResourceChanges()) { resourceChange.getValue(); } }
/** * Test method for {@link kieker.analysisteetime.model.TypeModelAssembler#addRecord(kieker.common.record.flow.IOperationRecord)}. */ @Test public void testComponentsExistsAfterAddRecordFromRecord() { final TypeModel typeModel = this.factory.createTypeModel(); final TypeModelAssembler typeModelAssembler = new TypeModelAssembler(typeModel, new JavaComponentSignatureExtractor(), new JavaOperationSignatureExtractor()); typeModelAssembler.addRecord(this.beforeOperationEvent1); typeModelAssembler.addRecord(this.beforeOperationEvent2); typeModelAssembler.addRecord(this.beforeOperationEvent3); final List<String> actualList = typeModel.getComponentTypes().values().stream().map(c -> c.getSignature()).collect(Collectors.toList()); final List<String> expectedList = Arrays.asList(EXAMPLE_CLASS_SIGNATURE_1, EXAMPLE_CLASS_SIGNATURE_2); Collections.sort(actualList); Collections.sort(expectedList); Assert.assertTrue(actualList.equals(expectedList)); }
.getExecutionModel().getAggregatedInvocations(); Assert.assertThat(aggregatedInvocations.values().size(), CoreMatchers.is(3));
/** * Test method for {@link kieker.analysisteetime.model.TypeModelAssembler#addRecord(kieker.common.record.flow.IOperationRecord)}. */ @Test public void testOperationExistsAfterAddRecordFromRecord() { final TypeModel typeModel = this.factory.createTypeModel(); final TypeModelAssembler typeModelAssembler = new TypeModelAssembler(typeModel, new JavaComponentSignatureExtractor(), new JavaOperationSignatureExtractor()); typeModelAssembler.addRecord(this.beforeOperationEvent1); typeModelAssembler.addRecord(this.beforeOperationEvent2); typeModelAssembler.addRecord(this.beforeOperationEvent3); final List<String> actualList = typeModel.getComponentTypes().get(EXAMPLE_CLASS_SIGNATURE_1).getProvidedOperations().values().stream() .map(c -> c.getSignature()).collect(Collectors.toList()); final List<String> expectedList = Arrays.asList(EXAMPLE_OPERATION_SIGNATURE_1, EXAMPLE_OPERATION_SIGNATURE_2); Collections.sort(actualList); Collections.sort(expectedList); Assert.assertTrue(actualList.equals(expectedList)); }
/** * Test method for {@link kieker.analysisteetime.model.TypeModelAssembler#addRecord(java.lang.String, java.lang.String)}. */ @Test public void testOperationExistsAfterAddRecordFromString() { final TypeModel typeModel = this.factory.createTypeModel(); final TypeModelAssembler typeModelAssembler = new TypeModelAssembler(typeModel, new JavaComponentSignatureExtractor(), new JavaOperationSignatureExtractor()); typeModelAssembler.addRecord(EXAMPLE_CLASS_SIGNATURE_1, EXAMPLE_OPERATION_SIGNATURE_1); typeModelAssembler.addRecord(EXAMPLE_CLASS_SIGNATURE_1, EXAMPLE_OPERATION_SIGNATURE_2); typeModelAssembler.addRecord(EXAMPLE_CLASS_SIGNATURE_2, EXAMPLE_OPERATION_SIGNATURE_3); final List<String> actualList = typeModel.getComponentTypes().get(EXAMPLE_CLASS_SIGNATURE_1).getProvidedOperations().values().stream() .map(c -> c.getSignature()).collect(Collectors.toList()); final List<String> expectedList = Arrays.asList(EXAMPLE_OPERATION_SIGNATURE_1, EXAMPLE_OPERATION_SIGNATURE_2); Collections.sort(actualList); Collections.sort(expectedList); Assert.assertTrue(actualList.equals(expectedList)); }