org.skyscreamer.nevado.jms.performance
Class PerformanceService

java.lang.Object
  extended by org.skyscreamer.nevado.jms.performance.PerformanceService

public class PerformanceService
extends Object

Runs a sample of messages to analyze send/receive performance

Author:
Carter Page

Constructor Summary
PerformanceService()
           
 
Method Summary
 PerformanceResult runSample(javax.jms.Connection connection, int numMessages, int messageSize, int numThreads, long messageSendDelayMs)
          Run a sample of messages, testing for performance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerformanceService

public PerformanceService()
Method Detail

runSample

public PerformanceResult runSample(javax.jms.Connection connection,
                                   int numMessages,
                                   int messageSize,
                                   int numThreads,
                                   long messageSendDelayMs)
                            throws javax.jms.JMSException,
                                   InterruptedException

Run a sample of messages, testing for performance.

Total # of messages = numMessages X numThreads

Parameters:
connection - Connection to use for creating temporary queues, and sending/receiving messages
numMessages - Number of messages to send on each thread
messageSize - Size of message payload (max 48k)
numThreads - Number of threads to create for sending and receiving
messageSendDelayMs - Delay time between sending each message. Added to total send time. Recommended 0.
Returns:
A result object containing the details of the performance run
Throws:
javax.jms.JMSException - A JMS exception was encountered during the run
InterruptedException - One or more threads was interrupted during the run


Copyright © 2013. All Rights Reserved.