public ConsumerParticipantResult createForConsumer(String participantName, String clientRegisteredName,
CreateConsumerCommand command, int acknowledgeMode, int numberOfMessagesReceived, int payloadSize,
long totalPayloadReceived, Date start, Date end, Collection<Long> messageLatencies)
{
ConsumerParticipantResult consumerParticipantResult = new ConsumerParticipantResult();
consumerParticipantResult.setMessageLatencies(messageLatencies);
setTestProperties(consumerParticipantResult, command, participantName, clientRegisteredName, acknowledgeMode);
setTestResultProperties(consumerParticipantResult, numberOfMessagesReceived, payloadSize, totalPayloadReceived, start, end);
consumerParticipantResult.setTopic(command.isTopic());
consumerParticipantResult.setDurableSubscription(command.isDurableSubscription());
consumerParticipantResult.setBrowsingSubscription(command.isBrowsingSubscription());
consumerParticipantResult.setSelector(command.getSelector() != null);
consumerParticipantResult.setNoLocal(command.isNoLocal());
consumerParticipantResult.setSynchronousConsumer(command.isSynchronous());
consumerParticipantResult.setTotalNumberOfConsumers(1);
consumerParticipantResult.setTotalNumberOfProducers(0);
SeriesStatistics statistics = new SeriesStatistics(messageLatencies);
consumerParticipantResult.setAverageLatency(statistics.getAverage());
consumerParticipantResult.setMinLatency(statistics.getMinimum());
consumerParticipantResult.setMaxLatency(statistics.getMaximum());
consumerParticipantResult.setLatencyStandardDeviation(statistics.getStandardDeviation());
return consumerParticipantResult;
}