diff --git a/activemq-perftest/pom.xml b/activemq-perftest/pom.xml
index 9a3f93b302..590944ecf8 100644
--- a/activemq-perftest/pom.xml
+++ b/activemq-perftest/pom.xml
@@ -19,7 +19,6 @@
incubator-activemq
maven-activemq-perf-plugin
- 4.1-SNAPSHOT
diff --git a/tooling/maven-activemq-perf-plugin/pom.xml b/tooling/maven-activemq-perf-plugin/pom.xml
index 339827cab1..6e3ba2acdf 100644
--- a/tooling/maven-activemq-perf-plugin/pom.xml
+++ b/tooling/maven-activemq-perf-plugin/pom.xml
@@ -25,42 +25,34 @@
incubator-activemq
activemq-core
- 4.1-SNAPSHOT
incubator-activemq
activemq-console
- 4.1-SNAPSHOT
incubator-activemq
activeio-core
- 3.0-beta2
org.apache.derby
derby
- 10.1.1.0
org.apache.derby
derbynet
- 10.1.1.0
backport-util-concurrent
backport-util-concurrent
- 2.1
org.apache.geronimo.specs
geronimo-jms_1.1_spec
- 1.0
org.apache.geronimo.specs
geronimo-j2ee-management_1.0_spec
- 1.0
diff --git a/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ConsumerMojo.java b/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ConsumerMojo.java
index 1dc5d8fae8..f1a6f1c359 100644
--- a/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ConsumerMojo.java
+++ b/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ConsumerMojo.java
@@ -110,11 +110,12 @@ public class ConsumerMojo
*/
private String recvCount;
- /**
+ /*
* @parameter expression="${consumer.recvDuration}" default-value="60000"
* @required
- */
+
private String recvDuration;
+ */
/**
* @parameter expression="${consumer.recvType}" default-value="time"
@@ -196,36 +197,35 @@ public class ConsumerMojo
public String[] createArgument() {
String[] options = new String[25];
- System.out.println("--- " + duration + " ----");
- options[0] = "-Dsampler.duration=" + duration; // 1 min
- options[1] = "-Dsampler.interval=" + interval; // 5 secs
- options[2] = "-Dsampler.rampUpTime=" + rampUpTime; // 10 secs
- options[3] = "-Dsampler.rampDownTime=" + rampDownTime; // 10 secs
+ options[0] = "sampler.duration=" + duration; // 1 min
+ options[1] = "sampler.interval=" + interval; // 5 secs
+ options[2] = "sampler.rampUpTime=" + rampUpTime; // 10 secs
+ options[3] = "sampler.rampDownTime=" + rampDownTime; // 10 secs
- options[4] = "-Dclient.spiClass=" + spiClass;
- options[5] = "-Dclient.sessTransacted=" + sessTransacted;
- options[6] = "-Dclient.sessAckMode=" + sessAckMode;
- options[7] = "-Dclient.destName=" + destName;
- options[8] = "-Dclient.destCount=" + destCount;
- options[9] = "-Dclient.destComposite=" + destComposite;
+ options[4] = "client.spiClass=" + spiClass;
+ options[5] = "client.sessTransacted=" + sessTransacted;
+ options[6] = "client.sessAckMode=" + sessAckMode;
+ options[7] = "client.destName=" + destName;
+ options[8] = "client.destCount=" + destCount;
+ options[9] = "client.destComposite=" + destComposite;
- options[10] = "-Dconsumer.durable=" + durable;
- options[11] = "-Dconsumer.asyncRecv=" + asyncRecv;
- options[12] = "-Dconsumer.recvCount=" + recvCount; // 1000 messages
- options[13] = "-Dconsumer.recvDuration=" + recvDuration; // 1 min
- options[14] = "-Dconsumer.recvType=" + recvType;
+ options[10] = "consumer.durable=" + durable;
+ options[11] = "consumer.asyncRecv=" + asyncRecv;
+ options[12] = "consumer.recvCount=" + recvCount; // 1000 messages
+ options[13] = "consumer.recvDuration=" + duration; // use sampler.duration.
+ options[14] = "consumer.recvType=" + recvType;
- options[15] = "-Dfactory.brokerUrl=" + brokerUrl;
- options[16] = "-Dfactory.optimAck=" + optimAck;
- options[17] = "-Dfactory.optimDispatch=" + optimDispatch;
- options[18] = "-Dfactory.prefetchQueue=" + prefetchQueue;
- options[19] = "-Dfactory.prefetchTopic=" + prefetchTopic;
- options[20] = "-Dfactory.useRetroactive=" + useRetroactive;
+ options[15] = "factory.brokerUrl=" + brokerUrl;
+ options[16] = "factory.optimAck=" + optimAck;
+ options[17] = "factory.optimDispatch=" + optimDispatch;
+ options[18] = "factory.prefetchQueue=" + prefetchQueue;
+ options[19] = "factory.prefetchTopic=" + prefetchTopic;
+ options[20] = "factory.useRetroactive=" + useRetroactive;
- options[21] = "-DsysTest.numClients=" + numClients;
- options[22] = "-DsysTest.totalDests=" + totalDests;
- options[23] = "-DsysTest.destDistro=" + destDistro;
- options[24] = "-DsysTest.reportDirectory=" + reportDirectory;
+ options[21] = "sysTest.numClients=" + numClients;
+ options[22] = "sysTest.totalDests=" + totalDests;
+ options[23] = "sysTest.destDistro=" + destDistro;
+ options[24] = "sysTest.reportDirectory=" + reportDirectory;
return options;
}
diff --git a/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ProducerMojo.java b/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ProducerMojo.java
index d08bd229af..454ba6e0a8 100644
--- a/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ProducerMojo.java
+++ b/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ProducerMojo.java
@@ -102,11 +102,12 @@ public class ProducerMojo
*/
private String sendCount;
- /**
+ /*
* @parameter expression="${producer.sendDuration}" default-value="60000"
* @required
- */
+
private String sendDuration;
+ */
/**
* @parameter expression="${producer.sendType}" default-value="time"
@@ -160,30 +161,30 @@ public class ProducerMojo
public String[] createArgument() {
String[] options = new String[20];
- options[0] = "-Dsampler.duration=" + duration; // 1 min
- options[1] = "-Dsampler.interval=" + interval; // 5 secs
- options[2] = "-Dsampler.rampUpTime=" + rampUpTime; // 10 secs
- options[3] = "-Dsampler.rampDownTime=" + rampDownTime; // 10 secs
+ options[0] = "sampler.duration=" + duration; // 1 min
+ options[1] = "sampler.interval=" + interval; // 5 secs
+ options[2] = "sampler.rampUpTime=" + rampUpTime; // 10 secs
+ options[3] = "sampler.rampDownTime=" + rampDownTime; // 10 secs
- options[4] = "-Dclient.spiClass=" + spiClass;
- options[5] = "-Dclient.sessTransacted=" + sessTransacted;
- options[6] = "-Dclient.sessAckMode=" + sessAckMode;
- options[7] = "-Dclient.destName=" + destName;
- options[8] = "-Dclient.destCount=" + destCount;
- options[9] = "-Dclient.destComposite=" + destComposite;
+ options[4] = "client.spiClass=" + spiClass;
+ options[5] = "client.sessTransacted=" + sessTransacted;
+ options[6] = "client.sessAckMode=" + sessAckMode;
+ options[7] = "client.destName=" + destName;
+ options[8] = "client.destCount=" + destCount;
+ options[9] = "client.destComposite=" + destComposite;
- options[10] = "-Dproducer.messageSize="+messageSize;
- options[11] = "-Dproducer.sendCount="+sendCount; // 1000 messages
- options[12] = "-Dproducer.sendDuration="+sendDuration; // 1 min
- options[13] = "-Dproducer.sendType="+sendType;
+ options[10] = "producer.messageSize="+messageSize;
+ options[11] = "producer.sendCount="+sendCount; // 1000 messages
+ options[12] = "producer.sendDuration="+duration; // use sampler.duration.
+ options[13] = "producer.sendType="+sendType;
- options[14] = "-Dfactory.brokerUrl="+brokerUrl;
- options[15] = "-Dfactory.asyncSend="+asyncSend;
+ options[14] = "factory.brokerUrl="+brokerUrl;
+ options[15] = "factory.asyncSend="+asyncSend;
- options[16] = "-DsysTest.numClients=" + numClients;
- options[17] = "-DsysTest.totalDests=" + totalDests;
- options[18] = "-DsysTest.destDistro=" + destDistro;
- options[19] = "-DsysTest.reportDirectory=" + reportDirectory;
+ options[16] = "sysTest.numClients=" + numClients;
+ options[17] = "sysTest.totalDests=" + totalDests;
+ options[18] = "sysTest.destDistro=" + destDistro;
+ options[19] = "sysTest.reportDirectory=" + reportDirectory;
return options;
}
diff --git a/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java b/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java
index 631ff31a7c..b6165a69d8 100644
--- a/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java
+++ b/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java
@@ -17,36 +17,30 @@
package org.apache.activemq.tool;
-import org.apache.commons.logging.LogFactory;
-import org.apache.commons.logging.Log;
-
-import javax.jms.MessageListener;
-import javax.jms.MessageConsumer;
-import javax.jms.JMSException;
-import javax.jms.Destination;
-import javax.jms.Topic;
-import javax.jms.Message;
-import java.util.Properties;
-
import edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicInteger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import javax.jms.*;
+import java.util.Properties;
public class JmsConsumerClient extends JmsPerformanceSupport {
private static final Log log = LogFactory.getLog(JmsConsumerClient.class);
private static final String PREFIX_CONFIG_CONSUMER = "consumer.";
- public static final String TIME_BASED_RECEIVING = "time";
- public static final String COUNT_BASED_RECEIVING = "count";
+ public static final String TIME_BASED_RECEIVING = "time";
+ public static final String COUNT_BASED_RECEIVING = "count";
- protected Properties jmsConsumerSettings = new Properties();
+ protected Properties jmsConsumerSettings = new Properties();
protected MessageConsumer jmsConsumer;
- protected boolean durable = false;
+ protected boolean durable = false;
protected boolean asyncRecv = true;
- protected String consumerName = "TestConsumerClient";
+ protected String consumerName = "TestConsumerClient";
- protected long recvCount = 1000000; // Receive a million messages by default
- protected long recvDuration = 5 * 60 * 1000; // Receive for 5 mins by default
- protected String recvType = TIME_BASED_RECEIVING;
+ protected long recvCount = 1000000; // Receive a million messages by default
+ protected long recvDuration = 5 * 60 * 1000; // Receive for 5 mins by default
+ protected String recvType = TIME_BASED_RECEIVING;
public void receiveMessages() throws JMSException {
if (listener != null) {
@@ -157,7 +151,7 @@ public class JmsConsumerClient extends JmsPerformanceSupport {
public MessageConsumer createJmsConsumer(Destination dest) throws JMSException {
if (isDurable()) {
- jmsConsumer = getSession().createDurableSubscriber((Topic)dest, getConsumerName());
+ jmsConsumer = getSession().createDurableSubscriber((Topic) dest, getConsumerName());
} else {
jmsConsumer = getSession().createConsumer(dest);
}
@@ -166,7 +160,7 @@ public class JmsConsumerClient extends JmsPerformanceSupport {
public MessageConsumer createJmsConsumer(Destination dest, String selector, boolean noLocal) throws JMSException {
if (isDurable()) {
- jmsConsumer = getSession().createDurableSubscriber((Topic)dest, getConsumerName(), selector, noLocal);
+ jmsConsumer = getSession().createDurableSubscriber((Topic) dest, getConsumerName(), selector, noLocal);
} else {
jmsConsumer = getSession().createConsumer(dest, selector, noLocal);
}
@@ -254,50 +248,21 @@ public class JmsConsumerClient extends JmsPerformanceSupport {
}
public static void main(String[] args) throws JMSException {
- /*String[] options = new String[21];
- options[0] = "-Dsampler.duration=60000"; // 1 min
- options[1] = "-Dsampler.interval=5000"; // 5 secs
- options[2] = "-Dsampler.rampUpTime=10000"; // 10 secs
- options[3] = "-Dsampler.rampDownTime=10000"; // 10 secs
- options[4] = "-Dclient.spiClass=org.apache.activemq.tool.spi.ActiveMQPojoSPI";
- options[5] = "-Dclient.sessTransacted=false";
- options[6] = "-Dclient.sessAckMode=autoAck";
- options[7] = "-Dclient.destName=topic://FOO.BAR.TEST";
- options[8] = "-Dclient.destCount=1";
- options[9] = "-Dclient.destComposite=false";
-
- options[10] = "-Dconsumer.durable=false";
- options[11] = "-Dconsumer.asyncRecv=true";
- options[12] = "-Dconsumer.recvCount=1000"; // 1000 messages
- options[13] = "-Dconsumer.recvDuration=60000"; // 1 min
- options[14] = "-Dconsumer.recvType=time";
-
- options[15] = "-Dfactory.brokerUrl=tcp://localhost:61616";
- options[16] = "-Dfactory.optimAck=true";
- options[17] = "-Dfactory.optimDispatch=true";
- options[18] = "-Dfactory.prefetchQueue=100";
- options[19] = "-Dfactory.prefetchTopic=32767";
- options[20] = "-Dfactory.useRetroactive=false";
-
- args = options; */
-
- Properties samplerSettings = new Properties();
+ Properties samplerSettings = new Properties();
Properties consumerSettings = new Properties();
- for (int i=0; i 1) {
- for (int i=0; i 1) {
- for (int i=0; i 1) {
while (System.currentTimeMillis() < endTime) {
- for (int j=0; j 1) {
while (System.currentTimeMillis() < endTime) {
- for (int j=0; j