mirror of https://github.com/apache/activemq.git
- Remove the property consumer.consumerName, since this has been replaced by consumer.clientName
- Shortened the default name of the xml file. - Added additional summary information. git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@413666 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
77c889d19e
commit
e0efebea98
|
@ -36,7 +36,6 @@ public class JmsConsumerClient extends JmsPerformanceSupport {
|
|||
|
||||
protected boolean durable = false;
|
||||
protected boolean asyncRecv = true;
|
||||
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
|
||||
|
@ -151,7 +150,11 @@ public class JmsConsumerClient extends JmsPerformanceSupport {
|
|||
|
||||
public MessageConsumer createJmsConsumer(Destination dest) throws JMSException {
|
||||
if (isDurable()) {
|
||||
jmsConsumer = getSession().createDurableSubscriber((Topic) dest, getConsumerName());
|
||||
String clientName = getClientName();
|
||||
if (clientName == null) {
|
||||
clientName = "JmsConsumer";
|
||||
}
|
||||
jmsConsumer = getSession().createDurableSubscriber((Topic) dest, clientName);
|
||||
} else {
|
||||
jmsConsumer = getSession().createConsumer(dest);
|
||||
}
|
||||
|
@ -160,7 +163,11 @@ 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);
|
||||
String clientName = getClientName();
|
||||
if (clientName == null) {
|
||||
clientName = "JmsConsumer";
|
||||
}
|
||||
jmsConsumer = getSession().createDurableSubscriber((Topic) dest, clientName, selector, noLocal);
|
||||
} else {
|
||||
jmsConsumer = getSession().createConsumer(dest, selector, noLocal);
|
||||
}
|
||||
|
@ -196,14 +203,6 @@ public class JmsConsumerClient extends JmsPerformanceSupport {
|
|||
this.asyncRecv = asyncRecv;
|
||||
}
|
||||
|
||||
public String getConsumerName() {
|
||||
return consumerName;
|
||||
}
|
||||
|
||||
public void setConsumerName(String consumerName) {
|
||||
this.consumerName = consumerName;
|
||||
}
|
||||
|
||||
public long getRecvCount() {
|
||||
return recvCount;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ public class JmsConsumerSystem extends JmsClientSystemSupport {
|
|||
|
||||
public String getReportName() {
|
||||
if (reportName == null) {
|
||||
return "JmsConsumer_ClientCount" + getNumClients() + "_DestCount" + getTotalDests() + "_" + getDestDistro() + ".xml";
|
||||
return "JmsConsumer_Client" + getNumClients() + "_Dest" + getTotalDests() + "_" + getDestDistro() + ".xml";
|
||||
} else {
|
||||
return reportName;
|
||||
}
|
||||
|
@ -42,7 +42,6 @@ public class JmsConsumerSystem extends JmsClientSystemSupport {
|
|||
|
||||
JmsConsumerClient consumer = new JmsConsumerClient();
|
||||
consumer.setSettings(clientSettings);
|
||||
consumer.setConsumerName(clientName); // For durable subscribers
|
||||
consumer.setClientName(clientName);
|
||||
|
||||
if (sampler != null) {
|
||||
|
|
|
@ -23,7 +23,7 @@ public class JmsProducerSystem extends JmsClientSystemSupport {
|
|||
|
||||
public String getReportName() {
|
||||
if (reportName == null) {
|
||||
return "JmsProducer_ClientCount" + getNumClients() + "_DestCount" + getTotalDests() + "_" + getDestDistro() + ".xml";
|
||||
return "JmsProducer_Client" + getNumClients() + "_Dest" + getTotalDests() + "_" + getDestDistro() + ".xml";
|
||||
} else {
|
||||
return reportName;
|
||||
}
|
||||
|
|
|
@ -28,10 +28,12 @@ import java.util.Set;
|
|||
import java.util.Iterator;
|
||||
|
||||
public abstract class AbstractPerfReportWriter implements PerformanceReportWriter {
|
||||
public static final String KEY_SYS_TOTAL_TP = "SystemTotalTP";
|
||||
public static final String KEY_SYS_TOTAL_CLIENTS = "SystemTotalClients";
|
||||
public static final String KEY_SYS_AVE_TP = "SystemAveTP";
|
||||
public static final String KEY_SYS_AVE_EMM_TP = "SystemAveEMMTP";
|
||||
public static final String KEY_SYS_TOTAL_TP = "SystemTotalTP";
|
||||
public static final String KEY_SYS_TOTAL_CLIENTS = "SystemTotalClients";
|
||||
public static final String KEY_SYS_AVE_TP = "SystemAveTP";
|
||||
public static final String KEY_SYS_AVE_EMM_TP = "SystemAveEMMTP";
|
||||
public static final String KEY_SYS_AVE_CLIENT_TP = "SystemAveClientTP";
|
||||
public static final String KEY_SYS_AVE_CLIENT_EMM_TP = "SystemAveClientEMMTP";
|
||||
public static final String KEY_MIN_CLIENT_TP = "MinClientTP";
|
||||
public static final String KEY_MAX_CLIENT_TP = "MaxClientTP";
|
||||
public static final String KEY_MIN_CLIENT_TOTAL_TP = "MinClientTotalTP";
|
||||
|
@ -175,6 +177,8 @@ public abstract class AbstractPerfReportWriter implements PerformanceReportWrite
|
|||
summary.put(KEY_SYS_TOTAL_CLIENTS, String.valueOf(clientCount));
|
||||
summary.put(KEY_SYS_AVE_TP, String.valueOf(systemAveTP));
|
||||
summary.put(KEY_SYS_AVE_EMM_TP, String.valueOf(systemAveEMMTP));
|
||||
summary.put(KEY_SYS_AVE_CLIENT_TP, String.valueOf(systemAveTP / clientCount));
|
||||
summary.put(KEY_SYS_AVE_CLIENT_EMM_TP, String.valueOf(systemAveEMMTP / clientCount));
|
||||
summary.put(KEY_MIN_CLIENT_TP, nameMinClientTP + "=" + minClientTP);
|
||||
summary.put(KEY_MAX_CLIENT_TP, nameMaxClientTP + "=" + maxClientTP);
|
||||
summary.put(KEY_MIN_CLIENT_TOTAL_TP, nameMinClientTotalTP + "=" + minClientTotalTP);
|
||||
|
|
|
@ -72,6 +72,8 @@ public class VerbosePerfReportWriter extends AbstractPerfReportWriter {
|
|||
System.out.println("[PERF-SUMMARY] System Total Clients: " + summary.get(KEY_SYS_TOTAL_CLIENTS));
|
||||
System.out.println("[PERF-SUMMARY] System Average Throughput: " + summary.get(KEY_SYS_AVE_TP));
|
||||
System.out.println("[PERF-SUMMARY] System Average Throughput Excluding Min/Max: " + summary.get(KEY_SYS_AVE_EMM_TP));
|
||||
System.out.println("[PERF-SUMMARY] System Average Client Throughput: " + summary.get(KEY_SYS_AVE_CLIENT_TP));
|
||||
System.out.println("[PERF-SUMMARY] System Average Client Throughput Excluding Min/Max: " + summary.get(KEY_SYS_AVE_CLIENT_EMM_TP));
|
||||
System.out.println("[PERF-SUMMARY] Min Client Throughput Per Sample: " + summary.get(KEY_MIN_CLIENT_TP));
|
||||
System.out.println("[PERF-SUMMARY] Max Client Throughput Per Sample: " + summary.get(KEY_MAX_CLIENT_TP));
|
||||
System.out.println("[PERF-SUMMARY] Min Client Total Throughput: " + summary.get(KEY_MIN_CLIENT_TOTAL_TP));
|
||||
|
|
|
@ -223,6 +223,14 @@ public class XmlFilePerfReportWriter extends AbstractPerfReportWriter {
|
|||
System.out.println("System Average Throughput Excluding Min/Max: " + val);
|
||||
xmlFileWriter.println("<prop key='" + KEY_SYS_AVE_EMM_TP + "'>" + val + "</prop>");
|
||||
|
||||
val = (String)summary.get(KEY_SYS_AVE_CLIENT_TP);
|
||||
System.out.println("System Average Client Throughput: " + val);
|
||||
xmlFileWriter.println("<prop key='" + KEY_SYS_AVE_CLIENT_TP + "'>" + val + "</prop>");
|
||||
|
||||
val = (String)summary.get(KEY_SYS_AVE_CLIENT_EMM_TP);
|
||||
System.out.println("System Average Client Throughput Excluding Min/Max: " + val);
|
||||
xmlFileWriter.println("<prop key='" + KEY_SYS_AVE_CLIENT_EMM_TP + "'>" + val + "</prop>");
|
||||
|
||||
val = (String)summary.get(KEY_MIN_CLIENT_TP);
|
||||
clientName = val.substring(0, val.indexOf("="));
|
||||
clientVal = val.substring(val.indexOf("=") + 1);
|
||||
|
|
Loading…
Reference in New Issue