I am running activemq performance benchmark using activemq-perf-maven-plugin,
and found the following defects in the code.

1. * logic error. * in ave throughput excluding min/max caculation
org.apache.activemq.tool.reports.PerformanceStatisticsUtil.getAveEx(List
numList)

the following code calc totalTP without minTP and maxTP, but sampeCount
include them, causing average number error.
 for (Iterator i = numList.iterator(); i.hasNext();) {
              *  sampleCount++;    *
                sampleTP = ((Long)i.next()).longValue();
                if (sampleTP != minTP && sampleTP != maxTP) {
                    *totalTP += sampleTP;*
                }
            }
 return (double)totalTP / (double)sampleCount;

should put sampleCount++ with totalTP.

2. *document unmentioned. *

the average throughput is not messages per second, but *messages per
tp-interval*, this may cause confusion without highlight notice in document.

3. *logic error* in destination distribution with 'divide' and 'equal'

while creating destionations for each client(producer or consumer),  the
code always start from* index 0 to destCount.*, causing the base index
setting before not work.

org.apache.activemq.tool.AbstractJmsClient.addDestinations(List<Destination>,
String, int)
 for (int i = 0; i < destCount; i++) {
            
destinations.add(createDestination(withDestinationSuffix(destName, i,
destCount)));
 }


simple fix to create destination from the base index.
org.apache.activemq.tool.AbstractJmsClient.withDestinationSuffix(String,
int, int)
return /*(this.destIndex == 0 && destCount == 1) ? name : */name + "." +
(this.destIndex + destIndex);


Regards!
20170505



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/ActiveMQ-Performance-plugin-defects-tp4725648.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Reply via email to