You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2015/09/23 12:42:33 UTC
svn commit: r1704809 - in /qpid/java/trunk/perftests/src:
main/java/org/apache/qpid/disttest/client/
main/java/org/apache/qpid/disttest/db/
main/java/org/apache/qpid/disttest/jms/
main/java/org/apache/qpid/disttest/message/ main/java/org/apache/qpid/di...
Author: kwall
Date: Wed Sep 23 10:42:33 2015
New Revision: 1704809
URL: http://svn.apache.org/viewvc?rev=1704809&view=rev
Log:
QPID-6732: [Java Perf Tests] Enchance perf tests to store JMS provider version and AMQP Protocol to allow for performance charts comparing versions
Modified:
qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/client/ConsumerParticipant.java
qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/client/ParticipantResultFactory.java
qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/client/ProducerParticipant.java
qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/db/ResultsDbWriter.java
qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/jms/ClientJmsDelegate.java
qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/message/ParticipantAttribute.java
qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/message/ParticipantResult.java
qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/results/aggregation/ParticipantResultAggregator.java
qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/results/aggregation/TestResultAggregator.java
qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/client/ParticipantResultFactoryTest.java
qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/ResultsTestFixture.java
qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/aggregation/ParticipantResultAggregatorTest.java
qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/aggregation/TestResultAggregatorTest.java
qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/formatting/expectedOutput.csv
Modified: qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/client/ConsumerParticipant.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/client/ConsumerParticipant.java?rev=1704809&r1=1704808&r2=1704809&view=diff
==============================================================================
--- qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/client/ConsumerParticipant.java (original)
+++ qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/client/ConsumerParticipant.java Wed Sep 23 10:42:33 2015
@@ -87,6 +87,8 @@ public class ConsumerParticipant impleme
public ParticipantResult doIt(String registeredClientName) throws Exception
{
final int acknowledgeMode = _jmsDelegate.getAcknowledgeMode(_command.getSessionName());
+ final String providerVersion = _jmsDelegate.getProviderVersion(_command.getSessionName());
+ final String protocolVersion = _jmsDelegate.getProtocolVersion(_command.getSessionName());
if (_command.isSynchronous())
{
@@ -127,7 +129,11 @@ public class ConsumerParticipant impleme
numberOfMessagesReceived,
payloadSize,
totalPayloadSize,
- start, end, _messageLatencies);
+ start,
+ end,
+ _messageLatencies,
+ providerVersion,
+ protocolVersion);
return result;
}
Modified: qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/client/ParticipantResultFactory.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/client/ParticipantResultFactory.java?rev=1704809&r1=1704808&r2=1704809&view=diff
==============================================================================
--- qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/client/ParticipantResultFactory.java (original)
+++ qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/client/ParticipantResultFactory.java Wed Sep 23 10:42:33 2015
@@ -31,17 +31,19 @@ import org.apache.qpid.disttest.results.
public class ParticipantResultFactory
{
- public ConsumerParticipantResult createForConsumer(String participantName, String clientRegisteredName,
- CreateConsumerCommand command, int acknowledgeMode, int numberOfMessagesReceived, int payloadSize,
- long totalPayloadReceived, Date start, Date end)
- {
- return createForConsumer(participantName, clientRegisteredName, command, acknowledgeMode, numberOfMessagesReceived,
- payloadSize, totalPayloadReceived, start, end, null);
- }
- public ConsumerParticipantResult createForConsumer(String participantName, String clientRegisteredName,
- CreateConsumerCommand command, int acknowledgeMode, int numberOfMessagesReceived, int payloadSize,
- long totalPayloadReceived, Date start, Date end, Collection<Long> messageLatencies)
+ public ConsumerParticipantResult createForConsumer(String participantName,
+ String clientRegisteredName,
+ CreateConsumerCommand command,
+ int acknowledgeMode,
+ int numberOfMessagesReceived,
+ int payloadSize,
+ long totalPayloadReceived,
+ Date start,
+ Date end,
+ Collection<Long> messageLatencies,
+ String providerVersion,
+ String protocolVersion)
{
ConsumerParticipantResult consumerParticipantResult = new ConsumerParticipantResult();
consumerParticipantResult.setMessageLatencies(messageLatencies);
@@ -63,10 +65,24 @@ public class ParticipantResultFactory
consumerParticipantResult.setMinLatency(statistics.getMinimum());
consumerParticipantResult.setMaxLatency(statistics.getMaximum());
consumerParticipantResult.setLatencyStandardDeviation(statistics.getStandardDeviation());
+
+ consumerParticipantResult.setProviderVersion(providerVersion);
+ consumerParticipantResult.setProtocolVersion(protocolVersion);
+
return consumerParticipantResult;
}
- public ProducerParticipantResult createForProducer(String participantName, String clientRegisteredName, CreateProducerCommand command, int acknowledgeMode, int numberOfMessagesSent, int payloadSize, long totalPayloadSent, Date start, Date end)
+ public ProducerParticipantResult createForProducer(String participantName,
+ String clientRegisteredName,
+ CreateProducerCommand command,
+ int acknowledgeMode,
+ int numberOfMessagesSent,
+ int payloadSize,
+ long totalPayloadSent,
+ Date start,
+ Date end,
+ String providerVersion,
+ String protocolVersion)
{
final ProducerParticipantResult producerParticipantResult = new ProducerParticipantResult();
@@ -77,6 +93,8 @@ public class ParticipantResultFactory
producerParticipantResult.setTotalNumberOfConsumers(0);
producerParticipantResult.setTotalNumberOfProducers(1);
+ producerParticipantResult.setProviderVersion(providerVersion);
+ producerParticipantResult.setProtocolVersion(protocolVersion);
setTestProperties(producerParticipantResult, command, participantName, clientRegisteredName, acknowledgeMode);
Modified: qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/client/ProducerParticipant.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/client/ProducerParticipant.java?rev=1704809&r1=1704808&r2=1704809&view=diff
==============================================================================
--- qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/client/ProducerParticipant.java (original)
+++ qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/client/ProducerParticipant.java Wed Sep 23 10:42:33 2015
@@ -67,6 +67,9 @@ public class ProducerParticipant impleme
@Override
public ParticipantResult doIt(String registeredClientName) throws Exception
{
+ final String providerVersion = _jmsDelegate.getProviderVersion(_command.getSessionName());
+ final String protocolVersion = _jmsDelegate.getProtocolVersion(_command.getSessionName());
+
long startTime = 0;
Message lastPublishedMessage = null;
int numberOfMessagesSent = 0;
@@ -158,7 +161,12 @@ public class ProducerParticipant impleme
_command,
_acknowledgeMode,
numberOfMessagesSent,
- payloadSize, totalPayloadSizeOfAllMessagesSent, start, end);
+ payloadSize,
+ totalPayloadSizeOfAllMessagesSent,
+ start,
+ end,
+ providerVersion,
+ protocolVersion);
}
@Override
Modified: qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/db/ResultsDbWriter.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/db/ResultsDbWriter.java?rev=1704809&r1=1704808&r2=1704809&view=diff
==============================================================================
--- qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/db/ResultsDbWriter.java (original)
+++ qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/db/ResultsDbWriter.java Wed Sep 23 10:42:33 2015
@@ -44,14 +44,6 @@ import org.apache.qpid.disttest.message.
import org.apache.qpid.disttest.results.ResultsWriter;
import org.apache.qpid.disttest.results.aggregation.ITestResult;
-/**
- * Intended call sequence:
- * <ul>
- * <li>{@link #ResultsDbWriter(Context, String)}</li>
- * <li>{@link #createResultsTableIfNecessary()}</li>
- * <li>{@link #writeResults(ResultsForAllTests)} (usually multiple times)</li>
- * </ul>
- */
public class ResultsDbWriter implements ResultsWriter
{
private static final Logger _logger = LoggerFactory.getLogger(ResultsDbWriter.class);
@@ -97,8 +89,10 @@ public class ResultsDbWriter implements
", %29$s bigint" + // MAX_LATENCY
", %30$s double" + // LATENCY_STANDARD_DEVIATION
", %31$s double" + // MESSAGE_THROUGHPUT
- ", %32$s varchar(200) not null" +
- ", %33$s timestamp not null" +
+ ", %32$s varchar(200)" + // PROVIDER_VERSION
+ ", %33$s varchar(200)" + // PROTOCOL_VERSION
+ ", %34$s varchar(200) not null" +
+ ", %35$s timestamp not null" +
")",
RESULTS_TABLE_NAME,
TEST_NAME.getDisplayName(),
@@ -131,6 +125,8 @@ public class ResultsDbWriter implements
MAX_LATENCY.getDisplayName(),
LATENCY_STANDARD_DEVIATION.getDisplayName(),
MESSAGE_THROUGHPUT.getDisplayName(),
+ PROVIDER_VERSION.getDisplayName(),
+ PROTOCOL_VERSION.getDisplayName(),
RUN_ID,
INSERTED_TIMESTAMP
);
@@ -345,8 +341,8 @@ public class ResultsDbWriter implements
try
{
String sqlTemplate = String.format(
- "INSERT INTO %s (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) " +
- "VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
+ "INSERT INTO %s (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) " +
+ "VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
RESULTS_TABLE_NAME,
TEST_NAME.getDisplayName(),
ITERATION_NUMBER.getDisplayName(),
@@ -378,6 +374,8 @@ public class ResultsDbWriter implements
MAX_LATENCY.getDisplayName(),
LATENCY_STANDARD_DEVIATION.getDisplayName(),
MESSAGE_THROUGHPUT.getDisplayName(),
+ PROVIDER_VERSION.getDisplayName(),
+ PROTOCOL_VERSION.getDisplayName(),
RUN_ID,
INSERTED_TIMESTAMP
);
@@ -414,6 +412,8 @@ public class ResultsDbWriter implements
statement.setLong(columnIndex++, participantResult.getMaxLatency());
statement.setDouble(columnIndex++, participantResult.getLatencyStandardDeviation());
statement.setDouble(columnIndex++, participantResult.getMessageThroughput());
+ statement.setString(columnIndex++, participantResult.getProviderVersion());
+ statement.setString(columnIndex++, participantResult.getProviderVersion());
statement.setString(columnIndex++, _runId);
statement.setTimestamp(columnIndex++, new Timestamp(_clock.currentTimeMillis()));
Modified: qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/jms/ClientJmsDelegate.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/jms/ClientJmsDelegate.java?rev=1704809&r1=1704808&r2=1704809&view=diff
==============================================================================
--- qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/jms/ClientJmsDelegate.java (original)
+++ qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/jms/ClientJmsDelegate.java Wed Sep 23 10:42:33 2015
@@ -19,6 +19,8 @@
*/
package org.apache.qpid.disttest.jms;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
import java.util.Enumeration;
import java.util.Map;
import java.util.UUID;
@@ -79,6 +81,7 @@ public class ClientJmsDelegate
private final ConcurrentMap<String, MessageConsumer> _testConsumers;
private final ConcurrentMap<String, Session> _testSubscriptions;
private final ConcurrentMap<String, MessageProvider> _testMessageProviders;
+ private final ConcurrentMap<Session, Connection> _testSessionToConnections;
private final MessageProvider _defaultMessageProvider;
@@ -102,6 +105,7 @@ public class ClientJmsDelegate
_testSubscriptions = new ConcurrentHashMap<>();
_testMessageProviders = new ConcurrentHashMap<>();
_defaultMessageProvider = new MessageProvider(null);
+ _testSessionToConnections = new ConcurrentHashMap<>();
}
catch (final NamingException ne)
{
@@ -225,9 +229,13 @@ public class ClientJmsDelegate
final boolean transacted = command.getAcknowledgeMode() == Session.SESSION_TRANSACTED;
final Session newSession = connection.createSession(transacted, command.getAcknowledgeMode());
- LOGGER.debug("Created session " + command.getSessionName() + " with transacted = " + newSession.getTransacted() + " and acknowledgeMode = " + newSession.getAcknowledgeMode());
+ LOGGER.debug("Created session {} with transacted = {} and acknowledgeMode = {}",
+ command.getSessionName(),
+ newSession.getTransacted(),
+ newSession.getAcknowledgeMode());
addSession(command.getSessionName(), newSession);
+ _testSessionToConnections.put(newSession, connection);
}
catch (final JMSException jmse)
{
@@ -358,36 +366,11 @@ public class ClientJmsDelegate
}
}
- public Destination getControllerQueue()
- {
- return _controllerQueue;
- }
-
public String getClientName()
{
return _clientName;
}
- public int getNoOfTestConnections()
- {
- return _testConnections.size();
- }
-
- public int getNoOfTestSessions()
- {
- return _testSessions.size();
- }
-
- public int getNoOfTestProducers()
- {
- return _testProducers.size();
- }
-
- public int getNoOfTestConsumers()
- {
- return _testConsumers.size();
- }
-
public void startConnections()
{
// start connections for consumers
@@ -473,7 +456,7 @@ public class ClientJmsDelegate
return messageProvider;
}
- protected void addSession(final String sessionName, final Session newSession)
+ private void addSession(final String sessionName, final Session newSession)
{
if(_testSessions.putIfAbsent(sessionName, newSession) != null)
{
@@ -481,7 +464,7 @@ public class ClientJmsDelegate
}
}
- protected void addConnection(final String connectionName, final Connection newConnection)
+ private void addConnection(final String connectionName, final Connection newConnection)
{
if(_testConnections.putIfAbsent(connectionName, newConnection) != null)
{
@@ -489,7 +472,7 @@ public class ClientJmsDelegate
}
}
- protected void addProducer(final String producerName, final MessageProducer jmsProducer)
+ private void addProducer(final String producerName, final MessageProducer jmsProducer)
{
if(_testProducers.putIfAbsent(producerName, jmsProducer) != null)
{
@@ -643,6 +626,8 @@ public class ClientJmsDelegate
_testProducers.clear();
_testConsumers.clear();
+ _testSessionToConnections.clear();
+
if (failureCounter > 0)
{
throw new DistributedTestException("Tear down test encountered " + failureCounter + " failures with the following errors: " + jmsErrorMessages.toString());
@@ -747,4 +732,100 @@ public class ClientJmsDelegate
// ignore
}
}
+
+ public String getProviderVersion(String sessionName)
+ {
+ Session session = _testSessions.get(sessionName);
+ Connection connection = getConnectionFor(session);
+
+ if (connection != null)
+ {
+ return getProviderVersion(connection);
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ public String getProtocolVersion(String sessionName)
+ {
+ Session session = _testSessions.get(sessionName);
+ Connection connection = getConnectionFor(session);
+ if (connection != null)
+ {
+ return getProtocolVersion(connection);
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ private String getProviderVersion(final Connection connection)
+ {
+ try
+ {
+ // Unfortunately, Qpid 0-8..0-10 does not define ConnectionMetaData#getProviderVersion in a useful way
+ String qpidRelease = getQpidReleaseVersionByReflection("org.apache.qpid.configuration.CommonProperties");
+ if (qpidRelease == null)
+ {
+ qpidRelease = getQpidReleaseVersionByReflection("org.apache.qpid.common.QpidProperties"); // < 0.32
+
+ if (qpidRelease == null && connection.getMetaData() != null)
+ {
+ ConnectionMetaData metaData = connection.getMetaData();
+ qpidRelease = metaData.getProviderVersion();
+ }
+ }
+
+ return qpidRelease;
+ }
+ catch (JMSException e)
+ {
+ return null;
+ }
+ }
+
+ private String getQpidReleaseVersionByReflection(final String className)
+ {
+ try
+ {
+ Class clazz = Class.forName(className);
+ Method method = clazz.getMethod("getReleaseVersion");
+ Object version = method.invoke(null);
+ return String.valueOf(version);
+ }
+ catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException | IllegalAccessException e)
+ {
+ return null;
+ }
+ }
+
+ private String getProtocolVersion(final Connection connection)
+ {
+ if (connection != null)
+ {
+ try
+ {
+ final Method method = connection.getClass().getMethod("getProtocolVersion"); // Qpid 0-8..0-10 method only
+ Object version = method.invoke(connection);
+ return String.valueOf(version);
+ }
+ catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e)
+ {
+ return null;
+ }
+ }
+ return null;
+ }
+
+ private Connection getConnectionFor(final Session session)
+ {
+ if (session != null)
+ {
+ return _testSessionToConnections.get(session);
+ }
+ return null;
+ }
}
Modified: qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/message/ParticipantAttribute.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/message/ParticipantAttribute.java?rev=1704809&r1=1704808&r2=1704809&view=diff
==============================================================================
--- qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/message/ParticipantAttribute.java (original)
+++ qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/message/ParticipantAttribute.java Wed Sep 23 10:42:33 2015
@@ -60,8 +60,9 @@ public enum ParticipantAttribute
MIN_LATENCY("minLatency"),
MAX_LATENCY("maxLatency"),
LATENCY_STANDARD_DEVIATION("latencyStandardDeviation"),
- MESSAGE_THROUGHPUT("throughputMessagesPerS")
- ;
+ MESSAGE_THROUGHPUT("throughputMessagesPerS"),
+ PROVIDER_VERSION("providerVersion"),
+ PROTOCOL_VERSION("protocolVersion");
private String _displayName;
private String _decimalFormat;
Modified: qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/message/ParticipantResult.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/message/ParticipantResult.java?rev=1704809&r1=1704808&r2=1704809&view=diff
==============================================================================
--- qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/message/ParticipantResult.java (original)
+++ qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/message/ParticipantResult.java Wed Sep 23 10:42:33 2015
@@ -55,6 +55,9 @@ public class ParticipantResult extends R
private int _totalNumberOfConsumers;
private int _totalNumberOfProducers;
+ private String _providerVersion;
+ private String _protocolVersion;
+
// As Session.SESSION_TRANSACTED is 0, we use value -1 so we can distinguish the case where an aggregated result
// summarizes results from participants using different session acknowledge modes.
private int _acknowledgeMode = -1;
@@ -319,4 +322,27 @@ public class ParticipantResult extends R
{
return 0;
}
+
+ @OutputAttribute(attribute = ParticipantAttribute.PROVIDER_VERSION)
+ public String getProviderVersion()
+ {
+ return _providerVersion;
+ }
+
+ public void setProviderVersion(final String providerVersion)
+ {
+ _providerVersion = providerVersion;
+ }
+
+ @OutputAttribute(attribute = ParticipantAttribute.PROTOCOL_VERSION)
+ public String getProtocolVersion()
+ {
+ return _protocolVersion;
+ }
+
+ public void setProtocolVersion(final String protocolVersion)
+ {
+ _protocolVersion = protocolVersion;
+ }
+
}
Modified: qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/results/aggregation/ParticipantResultAggregator.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/results/aggregation/ParticipantResultAggregator.java?rev=1704809&r1=1704808&r2=1704809&view=diff
==============================================================================
--- qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/results/aggregation/ParticipantResultAggregator.java (original)
+++ qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/results/aggregation/ParticipantResultAggregator.java Wed Sep 23 10:42:33 2015
@@ -40,14 +40,16 @@ public class ParticipantResultAggregator
private int _totalNumberOfConsumers = 0;
private int _totalNumberOfProducers = 0;
- private NavigableSet<Integer> _encounteredPayloadSizes = new TreeSet<Integer>();
- private NavigableSet<Integer> _encounteredIterationNumbers = new TreeSet<Integer>();
- private NavigableSet<Integer> _encounteredBatchSizes = new TreeSet<Integer>();
- private NavigableSet<Integer> _encounteredAcknowledgeMode = new TreeSet<Integer>();
- private NavigableSet<Integer> _encounteredDeliveryModes = new TreeSet<Integer>();
- private NavigableSet<Boolean> _encounteredDurableSubscriptions = new TreeSet<Boolean>();
- private NavigableSet<Boolean> _encounteredTopics = new TreeSet<Boolean>();
- private NavigableSet<String> _encountedTestNames = new TreeSet<String>();
+ private NavigableSet<Integer> _encounteredPayloadSizes = new TreeSet<>();
+ private NavigableSet<Integer> _encounteredIterationNumbers = new TreeSet<>();
+ private NavigableSet<Integer> _encounteredBatchSizes = new TreeSet<>();
+ private NavigableSet<Integer> _encounteredAcknowledgeMode = new TreeSet<>();
+ private NavigableSet<Integer> _encounteredDeliveryModes = new TreeSet<>();
+ private NavigableSet<Boolean> _encounteredDurableSubscriptions = new TreeSet<>();
+ private NavigableSet<Boolean> _encounteredTopics = new TreeSet<>();
+ private NavigableSet<String> _encounteredTestNames = new TreeSet<>();
+ private NavigableSet<String> _encounteredProviderVersions = new TreeSet<>();
+ private NavigableSet<String> _encounteredProtocolVersions = new TreeSet<>();
private SeriesStatistics _latencyStatistics = new SeriesStatistics();
@@ -114,7 +116,15 @@ public class ParticipantResultAggregator
{
if (result.getTestName() != null)
{
- _encountedTestNames.add(result.getTestName());
+ _encounteredTestNames.add(result.getTestName());
+ }
+ if (result.getProviderVersion() != null)
+ {
+ _encounteredProviderVersions.add(result.getProviderVersion());
+ }
+ if (result.getProtocolVersion() != null)
+ {
+ _encounteredProtocolVersions.add(result.getProtocolVersion());
}
_encounteredPayloadSizes.add(result.getPayloadSize());
_encounteredIterationNumbers.add(result.getIterationNumber());
@@ -155,9 +165,17 @@ public class ParticipantResultAggregator
{
aggregatedResult.setPayloadSize(_encounteredPayloadSizes.first());
}
- if (_encountedTestNames.size() == 1)
+ if (_encounteredTestNames.size() == 1)
+ {
+ aggregatedResult.setTestName(_encounteredTestNames.first());
+ }
+ if (_encounteredProviderVersions.size() == 1)
+ {
+ aggregatedResult.setProviderVersion(_encounteredProviderVersions.first());
+ }
+ if (_encounteredProtocolVersions.size() == 1)
{
- aggregatedResult.setTestName(_encountedTestNames.first());
+ aggregatedResult.setProtocolVersion(_encounteredProtocolVersions.first());
}
if (_encounteredBatchSizes.size() == 1)
{
Modified: qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/results/aggregation/TestResultAggregator.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/results/aggregation/TestResultAggregator.java?rev=1704809&r1=1704808&r2=1704809&view=diff
==============================================================================
--- qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/results/aggregation/TestResultAggregator.java (original)
+++ qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/results/aggregation/TestResultAggregator.java Wed Sep 23 10:42:33 2015
@@ -18,9 +18,6 @@
*/
package org.apache.qpid.disttest.results.aggregation;
-import java.util.List;
-
-import org.apache.qpid.disttest.controller.ResultsForAllTests;
import org.apache.qpid.disttest.message.ConsumerParticipantResult;
import org.apache.qpid.disttest.message.ParticipantResult;
import org.apache.qpid.disttest.message.ProducerParticipantResult;
Modified: qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/client/ParticipantResultFactoryTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/client/ParticipantResultFactoryTest.java?rev=1704809&r1=1704808&r2=1704809&view=diff
==============================================================================
--- qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/client/ParticipantResultFactoryTest.java (original)
+++ qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/client/ParticipantResultFactoryTest.java Wed Sep 23 10:42:33 2015
@@ -18,6 +18,7 @@
*/
package org.apache.qpid.disttest.client;
+import java.util.Collections;
import java.util.Date;
import javax.jms.DeliveryMode;
@@ -45,6 +46,9 @@ public class ParticipantResultFactoryTes
private static final Date START = new Date(0);
private static final Date END = new Date(START.getTime() + TIME_TAKEN);
+ private static final String PROVIDER_VERSION = "1.0";
+ private static final String PROTOCOL_VERSION = "MSS";
+
private ParticipantResultFactory _participantResultFactory;
@Override
@@ -84,7 +88,9 @@ public class ParticipantResultFactoryTes
NUMBER_OF_MESSAGES_PROCESSED,
PAYLOAD_SIZE,
TOTAL_PAYLOAD_PROCESSED,
- START, END);
+ START, END,
+ PROVIDER_VERSION,
+ PROTOCOL_VERSION);
assertCommonResultProperties(result);
@@ -94,7 +100,6 @@ public class ParticipantResultFactoryTes
assertEquals(producerInterval, result.getInterval());
assertEquals(timeToLive, result.getTimeToLive());
assertEquals(totalNumberOfConsumers, result.getTotalNumberOfConsumers());
- assertEquals(totalNumberOfProducers, result.getTotalNumberOfProducers());
}
public void testCreateForConsumer()
@@ -133,7 +138,10 @@ public class ParticipantResultFactoryTes
NUMBER_OF_MESSAGES_PROCESSED,
PAYLOAD_SIZE,
TOTAL_PAYLOAD_PROCESSED,
- START, END);
+ START, END,
+ Collections.<Long>emptyList(),
+ PROVIDER_VERSION,
+ PROTOCOL_VERSION);
assertCommonResultProperties(result);
@@ -173,6 +181,8 @@ public class ParticipantResultFactoryTes
assertEquals(NUMBER_OF_MESSAGES_PROCESSED, result.getNumberOfMessagesProcessed());
assertEquals(TOTAL_PAYLOAD_PROCESSED, result.getTotalPayloadProcessed());
assertEquals(PAYLOAD_SIZE, result.getPayloadSize());
+ assertEquals(PROVIDER_VERSION, result.getProviderVersion());
+ assertEquals(PROTOCOL_VERSION, result.getProtocolVersion());
}
}
Modified: qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/ResultsTestFixture.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/ResultsTestFixture.java?rev=1704809&r1=1704808&r2=1704809&view=diff
==============================================================================
--- qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/ResultsTestFixture.java (original)
+++ qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/ResultsTestFixture.java Wed Sep 23 10:42:33 2015
@@ -49,6 +49,8 @@ import static org.apache.qpid.disttest.m
import static org.apache.qpid.disttest.message.ParticipantAttribute.TOTAL_NUMBER_OF_CONSUMERS;
import static org.apache.qpid.disttest.message.ParticipantAttribute.TOTAL_NUMBER_OF_PRODUCERS;
import static org.apache.qpid.disttest.message.ParticipantAttribute.TOTAL_PAYLOAD_PROCESSED;
+import static org.apache.qpid.disttest.message.ParticipantAttribute.PROVIDER_VERSION;
+import static org.apache.qpid.disttest.message.ParticipantAttribute.PROTOCOL_VERSION;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -69,6 +71,8 @@ public class ResultsTestFixture
private static final String TEST1 = "TEST1";
private static final String PARTICIPANT = "PARTICIPANT";
private static final String CONFIGURED_CLIENT1 = "CONFIGURED_CLIENT1";
+ private static final String PROVIDER_VERSION1 = "PROVIDER_VERSION";
+ private static final String PROTOCOL_VERSION1 = "PROTOCOL_VERSION1";
public ResultsForAllTests createResultsForAllTests()
{
@@ -123,6 +127,8 @@ public class ResultsTestFixture
participantAttributes.put(AVERAGE_LATENCY, 4.6f);
participantAttributes.put(LATENCY_STANDARD_DEVIATION, 2.0f);
participantAttributes.put(MESSAGE_THROUGHPUT, 2);
+ participantAttributes.put(PROVIDER_VERSION, PROVIDER_VERSION1);
+ participantAttributes.put(PROTOCOL_VERSION, PROTOCOL_VERSION1);
return participantAttributes;
}
Modified: qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/aggregation/ParticipantResultAggregatorTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/aggregation/ParticipantResultAggregatorTest.java?rev=1704809&r1=1704808&r2=1704809&view=diff
==============================================================================
--- qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/aggregation/ParticipantResultAggregatorTest.java (original)
+++ qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/aggregation/ParticipantResultAggregatorTest.java Wed Sep 23 10:42:33 2015
@@ -32,6 +32,7 @@ public class ParticipantResultAggregator
private static final String TEST_NAME = "TEST_NAME";
private static final String AGGREGATED_RESULT_NAME = "AGGREGATED_RESULT_NAME";
+ private static final String PROVIDER_VERSION = "PROVIDER_VERSION";
private static final int TEST_ITERATION_NUMBER = 1;
private static final long PARTICIPANT1_STARTDATE = 50;
@@ -58,9 +59,9 @@ public class ParticipantResultAggregator
result.setEndDate(new Date(PARTICIPANT1_ENDDATE));
_aggregator.aggregate(result);
- ParticipantResult aggregratedResult = _aggregator.getAggregatedResult();
- assertEquals(PARTICIPANT1_STARTDATE, aggregratedResult.getStartInMillis());
- assertEquals(PARTICIPANT1_ENDDATE, aggregratedResult.getEndInMillis());
+ ParticipantResult aggregatedResult = _aggregator.getAggregatedResult();
+ assertEquals(PARTICIPANT1_STARTDATE, aggregatedResult.getStartInMillis());
+ assertEquals(PARTICIPANT1_ENDDATE, aggregatedResult.getEndInMillis());
}
public void testStartAndEndDateForTwoParticipantResults()
@@ -76,9 +77,9 @@ public class ParticipantResultAggregator
_aggregator.aggregate(result1);
_aggregator.aggregate(result2);
- ParticipantResult aggregratedResult = _aggregator.getAggregatedResult();
- assertEquals(PARTICIPANT1_STARTDATE, aggregratedResult.getStartInMillis());
- assertEquals(PARTICIPANT2_ENDDATE, aggregratedResult.getEndInMillis());
+ ParticipantResult aggregatedResult = _aggregator.getAggregatedResult();
+ assertEquals(PARTICIPANT1_STARTDATE, aggregatedResult.getStartInMillis());
+ assertEquals(PARTICIPANT2_ENDDATE, aggregatedResult.getEndInMillis());
}
public void testComputeNumberOfMessagesProcessed()
@@ -92,8 +93,8 @@ public class ParticipantResultAggregator
_aggregator.aggregate(result1);
_aggregator.aggregate(result2);
- ParticipantResult aggregratedResult = _aggregator.getAggregatedResult();
- assertEquals(25, aggregratedResult.getNumberOfMessagesProcessed());
+ ParticipantResult aggregatedResult = _aggregator.getAggregatedResult();
+ assertEquals(25, aggregatedResult.getNumberOfMessagesProcessed());
}
public void testComputeTotalPayloadProcessed()
@@ -107,8 +108,8 @@ public class ParticipantResultAggregator
_aggregator.aggregate(result1);
_aggregator.aggregate(result2);
- ParticipantResult aggregratedResult = _aggregator.getAggregatedResult();
- assertEquals(OVERALL_PROCESSED, aggregratedResult.getTotalPayloadProcessed());
+ ParticipantResult aggregatedResult = _aggregator.getAggregatedResult();
+ assertEquals(OVERALL_PROCESSED, aggregatedResult.getTotalPayloadProcessed());
}
public void testComputeThroughput()
@@ -126,8 +127,8 @@ public class ParticipantResultAggregator
_aggregator.aggregate(result1);
_aggregator.aggregate(result2);
- ParticipantResult aggregratedResult = _aggregator.getAggregatedResult();
- assertEquals(EXPECTED_AGGREGATED_ALL_THROUGHPUT, aggregratedResult.getThroughput(), 0.1);
+ ParticipantResult aggregatedResult = _aggregator.getAggregatedResult();
+ assertEquals(EXPECTED_AGGREGATED_ALL_THROUGHPUT, aggregatedResult.getThroughput(), 0.1);
}
public void testComputeMessageThroughput()
@@ -145,8 +146,8 @@ public class ParticipantResultAggregator
_aggregator.aggregate(result1);
_aggregator.aggregate(result2);
- ParticipantResult aggregratedResult = _aggregator.getAggregatedResult();
- assertEquals(EXPECTED_AGGREGATED_MESSAGE_THROUGHPUT, aggregratedResult.getMessageThroughput());
+ ParticipantResult aggregatedResult = _aggregator.getAggregatedResult();
+ assertEquals(EXPECTED_AGGREGATED_MESSAGE_THROUGHPUT, aggregatedResult.getMessageThroughput());
}
@@ -163,9 +164,9 @@ public class ParticipantResultAggregator
_aggregator.aggregate(result1);
_aggregator.aggregate(result2);
- ParticipantResult aggregratedResult = _aggregator.getAggregatedResult();
- assertEquals(TEST_ITERATION_NUMBER, aggregratedResult.getIterationNumber());
- assertEquals(TEST_NAME, aggregratedResult.getTestName());
+ ParticipantResult aggregatedResult = _aggregator.getAggregatedResult();
+ assertEquals(TEST_ITERATION_NUMBER, aggregatedResult.getIterationNumber());
+ assertEquals(TEST_NAME, aggregatedResult.getTestName());
}
public void testConstantPayloadSizesRolledUp() throws Exception
@@ -181,8 +182,8 @@ public class ParticipantResultAggregator
_aggregator.aggregate(result1);
_aggregator.aggregate(result2);
- ParticipantResult aggregratedResult = _aggregator.getAggregatedResult();
- assertEquals(payloadSize, aggregratedResult.getPayloadSize());
+ ParticipantResult aggregatedResult = _aggregator.getAggregatedResult();
+ assertEquals(payloadSize, aggregatedResult.getPayloadSize());
}
public void testDifferingPayloadSizesNotRolledUp() throws Exception
@@ -199,8 +200,8 @@ public class ParticipantResultAggregator
_aggregator.aggregate(result1);
_aggregator.aggregate(result2);
- ParticipantResult aggregratedResult = _aggregator.getAggregatedResult();
- assertEquals(0, aggregratedResult.getPayloadSize());
+ ParticipantResult aggregatedResult = _aggregator.getAggregatedResult();
+ assertEquals(0, aggregatedResult.getPayloadSize());
}
public void testConstantBatchSizesRolledUp() throws Exception
@@ -216,8 +217,8 @@ public class ParticipantResultAggregator
_aggregator.aggregate(result1);
_aggregator.aggregate(result2);
- ParticipantResult aggregratedResult = _aggregator.getAggregatedResult();
- assertEquals(batchSize, aggregratedResult.getBatchSize());
+ ParticipantResult aggregatedResult = _aggregator.getAggregatedResult();
+ assertEquals(batchSize, aggregatedResult.getBatchSize());
}
public void testDifferingBatchSizesNotRolledUp() throws Exception
@@ -234,8 +235,8 @@ public class ParticipantResultAggregator
_aggregator.aggregate(result1);
_aggregator.aggregate(result2);
- ParticipantResult aggregratedResult = _aggregator.getAggregatedResult();
- assertEquals(0, aggregratedResult.getBatchSize());
+ ParticipantResult aggregatedResult = _aggregator.getAggregatedResult();
+ assertEquals(0, aggregatedResult.getBatchSize());
}
public void testConstantAcknowledgeModesRolledUp() throws Exception
@@ -249,8 +250,8 @@ public class ParticipantResultAggregator
_aggregator.aggregate(result1);
_aggregator.aggregate(result2);
- ParticipantResult aggregratedResult = _aggregator.getAggregatedResult();
- assertEquals(Session.DUPS_OK_ACKNOWLEDGE, aggregratedResult.getAcknowledgeMode());
+ ParticipantResult aggregatedResult = _aggregator.getAggregatedResult();
+ assertEquals(Session.DUPS_OK_ACKNOWLEDGE, aggregatedResult.getAcknowledgeMode());
}
public void testDifferingAcknowledgeModesNotRolledUp() throws Exception
@@ -264,8 +265,8 @@ public class ParticipantResultAggregator
_aggregator.aggregate(result1);
_aggregator.aggregate(result2);
- ParticipantResult aggregratedResult = _aggregator.getAggregatedResult();
- assertEquals(-1, aggregratedResult.getAcknowledgeMode());
+ ParticipantResult aggregatedResult = _aggregator.getAggregatedResult();
+ assertEquals(-1, aggregatedResult.getAcknowledgeMode());
}
public void testSumNumberOfConsumerAndProducers() throws Exception
@@ -286,9 +287,74 @@ public class ParticipantResultAggregator
_aggregator.aggregate(result2);
_aggregator.aggregate(result3);
- ParticipantResult aggregratedResult = _aggregator.getAggregatedResult();
- assertEquals(expectedNumberOfConsumers, aggregratedResult.getTotalNumberOfConsumers());
- assertEquals(expectedNumberOfProducers, aggregratedResult.getTotalNumberOfProducers());
+ ParticipantResult aggregatedResult = _aggregator.getAggregatedResult();
+ assertEquals(expectedNumberOfConsumers, aggregatedResult.getTotalNumberOfConsumers());
+ assertEquals(expectedNumberOfProducers, aggregatedResult.getTotalNumberOfProducers());
}
+ public void testConstantProtocolRolledUp() throws Exception
+ {
+ String protocolVersion = "PROTOCOL_VERSION";
+
+ ParticipantResult result1 = new ParticipantResult();
+ result1.setProtocolVersion(protocolVersion);
+
+ ParticipantResult result2 = new ParticipantResult();
+ result2.setProtocolVersion(protocolVersion);
+
+ _aggregator.aggregate(result1);
+ _aggregator.aggregate(result2);
+
+ ParticipantResult aggregatedResult = _aggregator.getAggregatedResult();
+ assertEquals(protocolVersion, aggregatedResult.getProtocolVersion());
+ }
+
+ public void testDifferingProtocolNotRolledUp() throws Exception
+ {
+ ParticipantResult result1 = new ParticipantResult();
+ result1.setProtocolVersion("PROTOCOL_VERSION1");
+
+ ParticipantResult result2 = new ParticipantResult();
+ result2.setProtocolVersion("PROTOCOL_VERSION2");
+
+ _aggregator.aggregate(result1);
+ _aggregator.aggregate(result2);
+
+ ParticipantResult aggregatedResult = _aggregator.getAggregatedResult();
+ assertNull(aggregatedResult.getProtocolVersion());
+ }
+
+ public void testConstantProviderVersionRolledUp() throws Exception
+ {
+ String providerVersion = "PROVIDER_VERSION";
+
+ ParticipantResult result1 = new ParticipantResult();
+ result1.setProtocolVersion(providerVersion);
+
+ ParticipantResult result2 = new ParticipantResult();
+ result2.setProtocolVersion(providerVersion);
+
+ _aggregator.aggregate(result1);
+ _aggregator.aggregate(result2);
+
+ ParticipantResult aggregatedResult = _aggregator.getAggregatedResult();
+ assertEquals(providerVersion, aggregatedResult.getProtocolVersion());
+ }
+
+ public void testDifferingProviderVersionNotRolledUp() throws Exception
+ {
+ ParticipantResult result1 = new ParticipantResult();
+ result1.setProtocolVersion("PROVIDER_VERSION1");
+
+ ParticipantResult result2 = new ParticipantResult();
+ result2.setProtocolVersion("PROVIDER_VERSION2");
+
+ _aggregator.aggregate(result1);
+ _aggregator.aggregate(result2);
+
+ ParticipantResult aggregatedResult = _aggregator.getAggregatedResult();
+ assertNull(aggregatedResult.getProviderVersion());
+ }
+
+
}
Modified: qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/aggregation/TestResultAggregatorTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/aggregation/TestResultAggregatorTest.java?rev=1704809&r1=1704808&r2=1704809&view=diff
==============================================================================
--- qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/aggregation/TestResultAggregatorTest.java (original)
+++ qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/aggregation/TestResultAggregatorTest.java Wed Sep 23 10:42:33 2015
@@ -38,6 +38,9 @@ public class TestResultAggregatorTest ex
private static final String PRODUCER_PARTICIPANT_NAME = "PRODUCER_PARTICIPANT_NAME";
+ private static final String PROVIDER_VERSION = "PROVIDER_VERSION";
+ private static final String PROTOCOL_VERSION = "PROTOCOL_VERSION";
+
private static final long CONSUMER1_STARTDATE = 50;
private static final long CONSUMER1_ENDDATE = 20000;
@@ -76,17 +79,20 @@ public class TestResultAggregatorTest ex
assertMinimalAggregatedResults(
aggregatedTestResult.getAllConsumerParticipantResult(),
TEST1_NAME, TEST1_ITERATION_NUMBER,
- BATCH_SIZE, NUMBER_OF_MESSAGES_CONSUMED_IN_TOTAL, 2, 0);
+ BATCH_SIZE, NUMBER_OF_MESSAGES_CONSUMED_IN_TOTAL, 2, 0,
+ PROVIDER_VERSION, PROTOCOL_VERSION);
assertMinimalAggregatedResults(
aggregatedTestResult.getAllProducerParticipantResult(),
TEST1_NAME, TEST1_ITERATION_NUMBER,
- BATCH_SIZE, NUMBER_OF_MESSAGES_PRODUCED, 0, 1);
+ BATCH_SIZE, NUMBER_OF_MESSAGES_PRODUCED, 0, 1,
+ PROVIDER_VERSION, PROTOCOL_VERSION);
assertMinimalAggregatedResults(
aggregatedTestResult.getAllParticipantResult(),
TEST1_NAME, TEST1_ITERATION_NUMBER,
- BATCH_SIZE, NUMBER_OF_MESSAGES_CONSUMED_IN_TOTAL, 2, 1);
+ BATCH_SIZE, NUMBER_OF_MESSAGES_CONSUMED_IN_TOTAL, 2, 1,
+ PROVIDER_VERSION, PROTOCOL_VERSION);
}
public void testAggregateResultsWhenParticipantErrored()
@@ -125,23 +131,29 @@ public class TestResultAggregatorTest ex
assertMinimalAggregatedResults(
aggregatedTestResult.getAllConsumerParticipantResult(),
TEST1_NAME, TEST1_ITERATION_NUMBER,
- BATCH_SIZE, NUMBER_OF_MESSAGES_CONSUMED_IN_TOTAL, 2, 0);
+ BATCH_SIZE, NUMBER_OF_MESSAGES_CONSUMED_IN_TOTAL, 2, 0,
+ PROVIDER_VERSION, PROTOCOL_VERSION);
+
assertLatencyAggregatedResults(aggregatedTestResult.getAllConsumerParticipantResult());
assertMinimalAggregatedResults(
aggregatedTestResult.getAllProducerParticipantResult(),
TEST1_NAME, TEST1_ITERATION_NUMBER,
- BATCH_SIZE, NUMBER_OF_MESSAGES_PRODUCED, 0, 1);
+ BATCH_SIZE, NUMBER_OF_MESSAGES_PRODUCED, 0, 1,
+ PROVIDER_VERSION, PROTOCOL_VERSION);
+
assertMinimalAggregatedResults(
aggregatedTestResult.getAllParticipantResult(),
TEST1_NAME, TEST1_ITERATION_NUMBER,
- BATCH_SIZE, NUMBER_OF_MESSAGES_CONSUMED_IN_TOTAL, 2, 1);
+ BATCH_SIZE, NUMBER_OF_MESSAGES_CONSUMED_IN_TOTAL, 2, 1,
+ PROVIDER_VERSION, PROTOCOL_VERSION);
+
int expectedThroughtput = (int)Math.round(NUMBER_OF_MESSAGES_PRODUCED * 1000.0d /(CONSUMER2_ENDDATE - PRODUCER_STARTDATE));
ParticipantResult result = aggregatedTestResult.getAllParticipantResult();
- assertEquals("Unexpected message throughtput", expectedThroughtput, result.getMessageThroughput());
+ assertEquals("Unexpected message throughput", expectedThroughtput, result.getMessageThroughput());
}
private void assertLatencyAggregatedResults(ParticipantResult allConsumerParticipantResult)
@@ -154,7 +166,8 @@ public class TestResultAggregatorTest ex
assertEquals("Unexpected standard deviation", 2.0, results.getLatencyStandardDeviation(), 0.01);
}
- private void assertMinimalAggregatedResults(ParticipantResult result, String expectedTestName, int expectedIterationNumber, int expectedBatchSize, long expectedNumberOfMessagesProcessed, int expectedTotalNumberOfConsumers, int expectedTotalNumberOfProducers)
+ private void assertMinimalAggregatedResults(ParticipantResult result, String expectedTestName, int expectedIterationNumber, int expectedBatchSize, long expectedNumberOfMessagesProcessed, int expectedTotalNumberOfConsumers, int expectedTotalNumberOfProducers,
+ String expectedProviderVersion, String expectedProtocolVersion)
{
assertEquals("Unexpected test name in " + result.getParticipantName(), expectedTestName, result.getTestName());
assertEquals("Unexpected iteration number in " + result.getParticipantName(), expectedIterationNumber, result.getIterationNumber());
@@ -162,6 +175,8 @@ public class TestResultAggregatorTest ex
assertEquals("Unexpected number of messages processed in " + result.getParticipantName(), expectedNumberOfMessagesProcessed, result.getNumberOfMessagesProcessed());
assertEquals("Unexpected total number of consumers " + result.getParticipantName(), expectedTotalNumberOfConsumers, result.getTotalNumberOfConsumers());
assertEquals("Unexpected total number of producers " + result.getParticipantName(), expectedTotalNumberOfProducers, result.getTotalNumberOfProducers());
+ assertEquals("Unexpected provider version" + result.getProviderVersion(), expectedProviderVersion, result.getProviderVersion());
+ assertEquals("Unexpected protocol version" + result.getProtocolVersion(), expectedProtocolVersion, result.getProtocolVersion());
}
private TestResult createResultsFromTest()
@@ -169,21 +184,40 @@ public class TestResultAggregatorTest ex
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);
+ 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,
+ PROVIDER_VERSION,
+ PROTOCOL_VERSION);
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);
+ 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,
+ PROVIDER_VERSION,
+ PROTOCOL_VERSION);
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);
+ 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,
+ PROVIDER_VERSION,
+ PROTOCOL_VERSION);
testResult.addParticipantResult(producerResult);
return testResult;
}
- private void setPropertiesOn(ParticipantResult participantResult, String testName, int iterationNumber, String participantName, long numberOfMessagesProcessed, int batchSize, int payloadSize, long totalPayloadProcessed, long start, long end, int totalNumberOfConsumers, int totalNumberOfProducers)
+ private void setPropertiesOn(ParticipantResult participantResult,
+ String testName,
+ int iterationNumber,
+ String participantName,
+ long numberOfMessagesProcessed,
+ int batchSize,
+ int payloadSize,
+ long totalPayloadProcessed,
+ long start,
+ long end,
+ int totalNumberOfConsumers,
+ int totalNumberOfProducers,
+ String providerVersion,
+ String protocolVersion)
{
participantResult.setParticipantName(participantName);
participantResult.setTestName(testName);
@@ -197,6 +231,9 @@ public class TestResultAggregatorTest ex
participantResult.setStartDate(new Date(start));
participantResult.setEndDate(new Date(end));
participantResult.setBatchSize(batchSize);
+
+ participantResult.setProviderVersion(providerVersion);
+ participantResult.setProtocolVersion(protocolVersion);
}
}
Modified: qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/formatting/expectedOutput.csv
URL: http://svn.apache.org/viewvc/qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/formatting/expectedOutput.csv?rev=1704809&r1=1704808&r2=1704809&view=diff
==============================================================================
--- qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/formatting/expectedOutput.csv (original)
+++ qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/formatting/expectedOutput.csv Wed Sep 23 10:42:33 2015
@@ -1,2 +1,2 @@
-testName,iterationNumber,throughputKbPerS,averageLatency,clientName,participantName,numberOfMessages,payloadSizeB,priority,timeToLiveMs,acknowledgeMode,deliveryMode,batchSize,maximumDurationMs,producerIntervalMs,isTopic,isDurableSubscription,isBrowsingSubscription,isSelector,isNoLocal,isSynchronousConsumer,totalNumberOfConsumers,totalNumberOfProducers,totalPayloadProcessedB,timeTakenMs,errorMessage,minLatency,maxLatency,latencyStandardDeviation,throughputMessagesPerS
-TEST1,0,2048,5,CONFIGURED_CLIENT1,PARTICIPANT,2,1,2,3,4,5,6,7,9,true,false,true,false,true,false,1,2,1024,1000,error,2,9,2.0,2
+testName,iterationNumber,throughputKbPerS,averageLatency,clientName,participantName,numberOfMessages,payloadSizeB,priority,timeToLiveMs,acknowledgeMode,deliveryMode,batchSize,maximumDurationMs,producerIntervalMs,isTopic,isDurableSubscription,isBrowsingSubscription,isSelector,isNoLocal,isSynchronousConsumer,totalNumberOfConsumers,totalNumberOfProducers,totalPayloadProcessedB,timeTakenMs,errorMessage,minLatency,maxLatency,latencyStandardDeviation,throughputMessagesPerS,providerVersion,protocolVersion
+TEST1,0,2048,5,CONFIGURED_CLIENT1,PARTICIPANT,2,1,2,3,4,5,6,7,9,true,false,true,false,true,false,1,2,1024,1000,error,2,9,2.0,2,PROVIDER_VERSION,PROTOCOL_VERSION1
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org