use of org.apache.activemq.artemis.protocol.amqp.broker.AMQPMessage in project activemq-artemis by apache.
the class JMSTransformationSpeedComparisonTest method testTypicalQpidJMSMessage.
@Test
public void testTypicalQpidJMSMessage() throws Exception {
AMQPMessage encoded = new AMQPMessage(createTypicalQpidJMSMessage());
// Warm up
for (int i = 0; i < WARM_CYCLES; ++i) {
ICoreMessage intermediate = encoded.toCore();
encode(AMQPConverter.getInstance().fromCore(intermediate));
}
long totalDuration = 0;
long startTime = System.nanoTime();
for (int i = 0; i < PROFILE_CYCLES; ++i) {
ICoreMessage intermediate = encoded.toCore();
encode(AMQPConverter.getInstance().fromCore(intermediate));
}
totalDuration += System.nanoTime() - startTime;
LOG_RESULTS(totalDuration);
}
use of org.apache.activemq.artemis.protocol.amqp.broker.AMQPMessage in project activemq-artemis by apache.
the class JMSTransformationSpeedComparisonTest method testTypicalQpidJMSMessageInBoundOnly.
@Test
public void testTypicalQpidJMSMessageInBoundOnly() throws Exception {
AMQPMessage encoded = encode(createTypicalQpidJMSMessage());
// Warm up
for (int i = 0; i < WARM_CYCLES; ++i) {
ICoreMessage intermediate = encoded.toCore();
encode(AMQPConverter.getInstance().fromCore(intermediate));
}
long totalDuration = 0;
long startTime = System.nanoTime();
for (int i = 0; i < PROFILE_CYCLES; ++i) {
ICoreMessage intermediate = encoded.toCore();
encode(AMQPConverter.getInstance().fromCore(intermediate));
}
totalDuration += System.nanoTime() - startTime;
LOG_RESULTS(totalDuration);
}
Aggregations