Package org.apache.qpid.disttest.message

Examples of org.apache.qpid.disttest.message.ConsumerParticipantResult


        Date end = new Date();
        int numberOfMessagesSent = _totalNumberOfMessagesReceived.get();
        long totalPayloadSize = _totalPayloadSizeOfAllMessagesReceived.get();
        int payloadSize = getPayloadSizeForResultIfConstantOrZeroOtherwise(_allConsumedPayloadSizes);

        ConsumerParticipantResult result = _resultFactory.createForConsumer(
                getName(),
                registeredClientName,
                _command,
                acknowledgeMode,
                numberOfMessagesSent,
View Full Code Here


        {
            rollupConstantAttributes(result);
            computeVariableAttributes(result);
            if (result instanceof ConsumerParticipantResult)
            {
                ConsumerParticipantResult consumerParticipantResult = (ConsumerParticipantResult)result;
                _latencyStatistics.addMessageLatencies(consumerParticipantResult.getMessageLatencies());
                _latencyStatistics.aggregate();
            }
        }
    }
View Full Code Here

    public ParticipantResult getAggregatedResult()
    {
        ParticipantResult aggregatedResult;
        if (_targetClass == ConsumerParticipantResult.class)
        {
            ConsumerParticipantResult consumerParticipantResult = new ConsumerParticipantResult(_aggregatedResultName);
            consumerParticipantResult.setAverageLatency(_latencyStatistics.getAverage());
            consumerParticipantResult.setMinLatency(_latencyStatistics.getMinimum());
            consumerParticipantResult.setMaxLatency(_latencyStatistics.getMaximum());
            consumerParticipantResult.setLatencyStandardDeviation(_latencyStatistics.getStandardDeviation());
            aggregatedResult = consumerParticipantResult;
        }
        else
        {
            aggregatedResult = new ParticipantResult(_aggregatedResultName);
View Full Code Here

            ProducerParticipantResult producerParticipantResult = (ProducerParticipantResult) result;
            _encounteredDeliveryModes.add(producerParticipantResult.getDeliveryMode());
        }
        else if(result instanceof ConsumerParticipantResult)
        {
            ConsumerParticipantResult consumerParticipantResult = (ConsumerParticipantResult)result;
            _encounteredDurableSubscriptions.add(consumerParticipantResult.isDurableSubscription());
            _encounteredTopics.add(consumerParticipantResult.isTopic());
        }
    }
View Full Code Here

                producerParticipantResult.setDeliveryMode(_encounteredDeliveryModes.first());
            }
        }
        if (aggregatedResult instanceof ConsumerParticipantResult)
        {
            ConsumerParticipantResult consumerParticipantResult = (ConsumerParticipantResult) aggregatedResult;
            if(_encounteredDurableSubscriptions.size() == 1)
            {
                consumerParticipantResult.setDurableSubscription(_encounteredDurableSubscriptions.first());
            }
            if(_encounteredTopics.size() == 1)
            {
                consumerParticipantResult.setTopic(_encounteredTopics.first());
            }
        }
    }
View Full Code Here

        Date end = new Date();
        int numberOfMessagesSent = _totalNumberOfMessagesReceived.get();
        long totalPayloadSize = _totalPayloadSizeOfAllMessagesReceived.get();
        int payloadSize = getPayloadSizeForResultIfConstantOrZeroOtherwise(_allConsumedPayloadSizes);

        ConsumerParticipantResult result = _resultFactory.createForConsumer(
                getName(),
                registeredClientName,
                _command,
                acknowledgeMode,
                numberOfMessagesSent,
View Full Code Here

    }

    private void assertLatencyAggregatedResults(ParticipantResult allConsumerParticipantResult)
    {
        assertTrue("Unexpected result", allConsumerParticipantResult instanceof ConsumerParticipantResult);
        ConsumerParticipantResult results = (ConsumerParticipantResult)allConsumerParticipantResult;
        assertEquals("Unexpected average", 5.0, results.getAverageLatency(), 0.01);
        assertEquals("Unexpected min", 2, results.getMinLatency());
        assertEquals("Unexpected max", 9, results.getMaxLatency());
        assertEquals("Unexpected standard deviation", 2.0, results.getLatencyStandardDeviation(), 0.01);
    }
View Full Code Here

    private TestResult createResultsFromTest()
    {
        TestResult testResult = new TestResult(TEST1_NAME);

        ConsumerParticipantResult consumerResult1 = new ConsumerParticipantResult();
        setPropertiesOn(consumerResult1, TEST1_NAME, TEST1_ITERATION_NUMBER, CONSUMER_PARTICIPANT_NAME1, NUMBER_OF_MESSAGES_PROCESSED_PER_CONSUMER, BATCH_SIZE, PAYLOAD_SIZE, TOTAL_PAYLOAD_PROCESSED_PER_CONSUMER, CONSUMER1_STARTDATE, CONSUMER1_ENDDATE, 1, 0);
        testResult.addParticipantResult(consumerResult1);

        ConsumerParticipantResult consumerResult2 = new ConsumerParticipantResult();
        setPropertiesOn(consumerResult2, TEST1_NAME, TEST1_ITERATION_NUMBER, CONSUMER_PARTICIPANT_NAME2, NUMBER_OF_MESSAGES_PROCESSED_PER_CONSUMER, BATCH_SIZE, PAYLOAD_SIZE, TOTAL_PAYLOAD_PROCESSED_PER_CONSUMER, CONSUMER2_STARTDATE, CONSUMER2_ENDDATE, 1, 0);
        testResult.addParticipantResult(consumerResult2);

        ParticipantResult producerResult = new ProducerParticipantResult();
        setPropertiesOn(producerResult, TEST1_NAME, TEST1_ITERATION_NUMBER, PRODUCER_PARTICIPANT_NAME, NUMBER_OF_MESSAGES_PRODUCED, BATCH_SIZE, PAYLOAD_SIZE, TOTAL_PAYLOAD_PRODUCED_IN_TOTAL, PRODUCER_STARTDATE, PRODUCER_ENDDATE, 0, 1);
View Full Code Here

        TestResult testResult1 = resultList.get(0);
        assertEquals("Unexpected test name", "Test 1", testResult1.getName());
        List<ParticipantResult> test1ParticipantResults = testResult1.getParticipantResults();
        assertEquals("Unexpected number of participant results for test 1", 2, test1ParticipantResults.size());
        assertParticipantNames(test1ParticipantResults, "participantConsumer1", "participantProducer1");
        ConsumerParticipantResult result = null;
        for (ParticipantResult participantResult : test1ParticipantResults)
        {
            if (participantResult instanceof ConsumerParticipantResult)
            {
                result = (ConsumerParticipantResult)participantResult;
                break;
            }
        }
        assertNotNull("Consumer results not recived", result);
        Collection<Long> latencies = result.getMessageLatencies();
        assertNotNull("Latency results are not collected", latencies);
        assertEquals("Unexpected latency results", 1, latencies.size());
    }
View Full Code Here

        List<ParticipantResult> test1ParticipantResults = testResult1.getParticipantResults();
        assertEquals("Unexpected number of participant results for test", 4, test1ParticipantResults.size());

        assertParticipantNames(test1ParticipantResults, "participantConsumer1", "participantConsumer2", "participantConsumer3", "participantProducer1");

        ConsumerParticipantResult consumer1 = (ConsumerParticipantResult) test1ParticipantResults.get(0);
        assertEquals(3, consumer1.getNumberOfMessagesProcessed());
        assertEquals(true, consumer1.isSynchronousConsumer());

        ProducerParticipantResult producer1 = (ProducerParticipantResult) test1ParticipantResults.get(3);
        assertEquals(9, producer1.getNumberOfMessagesProcessed());
        assertEquals(2, producer1.getBatchSize());
        assertEquals(50, producer1.getInterval());
View Full Code Here

TOP

Related Classes of org.apache.qpid.disttest.message.ConsumerParticipantResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.