invocationSequenceData.setChildCount(invocationSequenceData.getChildCount() + 1L); InvocationSequenceData nestedInvocationSequenceData = new InvocationSequenceData(timestamp, platformId, invocationSequenceData.getSensorTypeIdent(), methodId); nestedInvocationSequenceData.setStart(timer.getCurrentTime()); nestedInvocationSequenceData.setParentSequence(invocationSequenceData);
/** * {@inheritDoc} */ @Override public InvocationSequenceData getInvocationSequenceDetail(InvocationSequenceData template) { // here we need to create new query since this one does not exist in factory StorageIndexQuery query = invocationDataQueryFactory.getIndexQueryProvider().getIndexQuery(); ArrayList<Class<?>> searchedClasses = new ArrayList<>(); searchedClasses.add(InvocationSequenceData.class); query.setObjectClasses(searchedClasses); query.setPlatformIdent(template.getPlatformIdent()); query.setMethodIdent(template.getMethodIdent()); query.setSensorTypeIdent(template.getSensorTypeIdent()); query.setOnlyInvocationsWithoutChildren(false); ArrayList<Long> includeIds = new ArrayList<>(); includeIds.add(template.getId()); query.setIncludeIds(includeIds); List<InvocationSequenceData> results = super.executeQuery(query); if (results.size() == 1) { return results.get(0); } return null; }
assertThat(invocation.getPlatformIdent(), is(platformId)); assertThat(invocation.getMethodIdent(), is(methodId)); assertThat(invocation.getSensorTypeIdent(), is(sensorTypeId)); assertThat(invocation.getDuration(), is(secondTimerValue - firstTimerValue)); assertThat(invocation.getNestedSequences(), is(empty()));
assertThat(invocation.getPlatformIdent(), is(platformId)); assertThat(invocation.getMethodIdent(), is(methodId)); assertThat(invocation.getSensorTypeIdent(), is(sensorTypeId)); assertThat(invocation.getDuration(), is(secondTimerValue - firstTimerValue)); assertThat(invocation.getNestedSequences(), is(empty()));
assertThat(invocation.getPlatformIdent(), is(platformId)); assertThat(invocation.getMethodIdent(), is(methodId1)); assertThat(invocation.getSensorTypeIdent(), is(sensorTypeId)); assertThat(invocation.getDuration(), is(thirdTimerValue - firstTimerValue)); assertThat(invocation.getNestedSequences(), hasSize(0));
assertThat(invocation.getPlatformIdent(), is(platformId)); assertThat(invocation.getMethodIdent(), is(methodId1)); assertThat(invocation.getSensorTypeIdent(), is(sensorTypeId)); assertThat(invocation.getDuration(), is(thirdTimerValue - firstTimerValue)); assertThat(invocation.getNestedSequences(), hasSize(0));
assertThat(invocation.getPlatformIdent(), is(platformId)); assertThat(invocation.getMethodIdent(), is(methodId)); assertThat(invocation.getSensorTypeIdent(), is(sensorTypeId)); assertThat(invocation.getDuration(), is(secondTimerValue - firstTimerValue)); assertThat(invocation.getNestedSequences(), is(empty()));
assertThat(invocation.getPlatformIdent(), is(platformId)); assertThat(invocation.getMethodIdent(), is(methodId)); assertThat(invocation.getSensorTypeIdent(), is(sensorTypeId)); assertThat(invocation.getDuration(), is(secondTimerValue - firstTimerValue)); assertThat(invocation.getNestedSequences(), is(empty()));
assertThat(invocation.getPlatformIdent(), is(platformId)); assertThat(invocation.getMethodIdent(), is(methodId1)); assertThat(invocation.getSensorTypeIdent(), is(sensorTypeId)); assertThat(invocation.getDuration(), is(fourthTimerValue - firstTimerValue)); assertThat(invocation.getNestedSequences(), hasSize(1)); assertThat(child.getPlatformIdent(), is(platformId)); assertThat(child.getMethodIdent(), is(methodId2)); assertThat(child.getSensorTypeIdent(), is(sensorTypeId)); assertThat(child.getDuration(), is(thirdTimerValue - secondTimerValue)); assertThat(child.getNestedSequences(), is(empty()));
assertThat(invocation.getPlatformIdent(), is(platformId)); assertThat(invocation.getMethodIdent(), is(methodId1)); assertThat(invocation.getSensorTypeIdent(), is(sensorTypeId)); assertThat(invocation.getDuration(), is(fifthTimerValue - firstTimerValue)); assertThat(invocation.getNestedSequences(), hasSize(1)); assertThat(child.getPlatformIdent(), is(platformId)); assertThat(child.getMethodIdent(), is(methodId3)); assertThat(child.getSensorTypeIdent(), is(sensorTypeId)); assertThat(child.getDuration(), is(fourthTimerValue - thirdTimerValue)); assertThat(child.getNestedSequences(), is(empty()));
assertThat(invocation.getPlatformIdent(), is(platformId)); assertThat(invocation.getMethodIdent(), is(methodId1)); assertThat(invocation.getSensorTypeIdent(), is(sensorTypeId)); assertThat(invocation.getDuration(), is(fourthTimerValue - firstTimerValue)); assertThat(invocation.getNestedSequences(), hasSize(1)); assertThat(child.getPlatformIdent(), is(platformId)); assertThat(child.getMethodIdent(), is(methodId2)); assertThat(child.getSensorTypeIdent(), is(sensorTypeId)); assertThat(child.getDuration(), is(thirdTimerValue - secondTimerValue)); assertThat(child.getNestedSequences(), is(empty()));
assertThat(invocation.getPlatformIdent(), is(platformId)); assertThat(invocation.getMethodIdent(), is(methodId1)); assertThat(invocation.getSensorTypeIdent(), is(sensorTypeId)); assertThat(invocation.getDuration(), is(fourthTimerValue - firstTimerValue)); assertThat(invocation.getNestedSequences(), hasSize(1)); assertThat(child.getPlatformIdent(), is(platformId)); assertThat(child.getMethodIdent(), is(methodId2)); assertThat(child.getSensorTypeIdent(), is(sensorTypeId)); assertThat(child.getDuration(), is(thirdTimerValue - secondTimerValue)); assertThat(child.getNestedSequences(), is(empty()));
assertThat(invocation.getPlatformIdent(), is(platformId)); assertThat(invocation.getMethodIdent(), is(methodId1)); assertThat(invocation.getSensorTypeIdent(), is(sensorTypeId)); assertThat(invocation.getDuration(), is(fourthTimerValue - firstTimerValue)); assertThat(invocation.getNestedSequences(), hasSize(1)); assertThat(child.getPlatformIdent(), is(platformId)); assertThat(child.getMethodIdent(), is(methodId2)); assertThat(child.getSensorTypeIdent(), is(sensorTypeId)); assertThat(child.getDuration(), is(thirdTimerValue - secondTimerValue)); assertThat(child.getNestedSequences(), is(empty()));
assertThat(invocation.getPlatformIdent(), is(platformId)); assertThat(invocation.getMethodIdent(), is(methodId1)); assertThat(invocation.getSensorTypeIdent(), is(sensorTypeId)); assertThat(invocation.getDuration(), is(thirdTimerValue - firstTimerValue)); assertThat(invocation.getNestedSequences(), hasSize(1)); assertThat(child.getPlatformIdent(), is(platformId)); assertThat(child.getMethodIdent(), is(methodId2)); assertThat(child.getSensorTypeIdent(), is(sensorTypeId)); assertThat(child.getDuration(), is(thirdTimerValue - secondTimerValue)); assertThat(child.getNestedSequences(), is(empty()));
assertThat(invocation.getPlatformIdent(), is(platformId)); assertThat(invocation.getMethodIdent(), is(methodId1)); assertThat(invocation.getSensorTypeIdent(), is(sensorTypeId)); assertThat(invocation.getDuration(), is(fourthTimerValue - firstTimerValue)); assertThat(invocation.getNestedSequences(), hasSize(1)); assertThat(child.getPlatformIdent(), is(platformId)); assertThat(child.getMethodIdent(), is(methodId2)); assertThat(child.getSensorTypeIdent(), is(sensorTypeId)); assertThat(child.getDuration(), is(thirdTimerValue - secondTimerValue)); assertThat(child.getNestedSequences(), is(empty()));
assertThat(invocation.getPlatformIdent(), is(platformId)); assertThat(invocation.getMethodIdent(), is(methodId1)); assertThat(invocation.getSensorTypeIdent(), is(sensorTypeId)); assertThat(invocation.getDuration(), is(fourthTimerValue - firstTimerValue)); assertThat(invocation.getNestedSequences(), hasSize(1)); assertThat(child.getPlatformIdent(), is(platformId)); assertThat(child.getMethodIdent(), is(methodId1)); assertThat(child.getSensorTypeIdent(), is(sensorTypeId)); assertThat(child.getDuration(), is(thirdTimerValue - secondTimerValue)); assertThat(child.getNestedSequences(), is(empty()));
/** * Clones invocation sequence. This method returns new object exactly same as the original * object, but with out nested sequences set. * * @return Cloned invocation sequence. */ public InvocationSequenceData getClonedInvocationSequence() { InvocationSequenceData clone = new InvocationSequenceData(this.getTimeStamp(), this.getPlatformIdent(), this.getSensorTypeIdent(), this.getMethodIdent()); clone.setId(this.getId()); clone.setSpanIdent(this.getSpanIdent()); clone.setChildCount(this.getChildCount()); clone.setDuration(this.getDuration()); clone.setEnd(this.getEnd()); clone.setNestedSequences(Collections.<InvocationSequenceData> emptyList()); clone.setParameterContentData(this.getParameterContentData()); clone.setParentSequence(this.getParentSequence()); clone.setPosition(this.getPosition()); clone.setSqlStatementData(this.getSqlStatementData()); clone.setTimerData(this.getTimerData()); clone.setExceptionSensorDataObjects(this.getExceptionSensorDataObjects()); clone.setStart(this.getStart()); clone.setNestedSqlStatements(this.isNestedSqlStatements()); clone.setNestedExceptions(this.isNestedExceptions()); clone.setLoggingData(this.getLoggingData()); clone.setApplicationId(this.getApplicationId()); clone.setBusinessTransactionId(this.getBusinessTransactionId()); return clone; }
idDefinition.setPlatformId(invocationSequenceData.getPlatformIdent()); idDefinition.setMethodId(invocationSequenceData.getMethodIdent()); idDefinition.setSensorTypeId(invocationSequenceData.getSensorTypeIdent());