Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.activemq.store.journal
Class JournalBrokerBenchmark  view JournalBrokerBenchmark download JournalBrokerBenchmark.java

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.activemq.store.journal.JournalBrokerBenchmark
All Implemented Interfaces:
junit.framework.Test

public class JournalBrokerBenchmark
extends junit.framework.TestCase

Benchmarks the Journal Store by using an embeded broker to add and remove messages from the store. Make sure you run with jvm option -server (makes a big difference). The tests simulate storing 1000 1k jms messages to see the rate of processing msg/sec.

Version:
$Revision: 1.1 $

Nested Class Summary
(package private) static class JournalBrokerBenchmark.ProgressPrinter
           
 
Field Summary
private  org.activemq.broker.impl.BrokerContainerImpl broker
           
private  org.activemq.ActiveMQConnectionFactory connectionFactory
           
private  org.activemq.message.ActiveMQQueue dest
           
private static int MESSAGE_COUNT
           
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
JournalBrokerBenchmark()
           
 
Method Summary
static void main(java.lang.String[] args)
           
protected  void setUp()
          Sets up the fixture, for example, open a network connection.
protected  void tearDown()
          Tears down the fixture, for example, close a network connection.
 void testConcurrentSendReceive()
          Moves about 6000 msg/sec on a Win XP 3.2 ghz Intel Machine.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MESSAGE_COUNT

private static final int MESSAGE_COUNT

broker

private org.activemq.broker.impl.BrokerContainerImpl broker

dest

private org.activemq.message.ActiveMQQueue dest

connectionFactory

private org.activemq.ActiveMQConnectionFactory connectionFactory
Constructor Detail

JournalBrokerBenchmark

public JournalBrokerBenchmark()
Method Detail

main

public static void main(java.lang.String[] args)

setUp

protected void setUp()
              throws java.lang.Exception
Description copied from class: junit.framework.TestCase
Sets up the fixture, for example, open a network connection. This method is called before a test is executed.


tearDown

protected void tearDown()
                 throws java.lang.Exception
Description copied from class: junit.framework.TestCase
Tears down the fixture, for example, close a network connection. This method is called after a test is executed.


testConcurrentSendReceive

public void testConcurrentSendReceive()
                               throws java.lang.Throwable
Moves about 6000 msg/sec on a Win XP 3.2 ghz Intel Machine.