mirror of https://github.com/apache/activemq.git
[AMQ-6518] - fix up aveMessageSize dest stat and test
This commit is contained in:
parent
89c1a7b8ba
commit
cfdff4edc5
|
@ -120,7 +120,7 @@ public class StatisticsBroker extends BrokerFilter {
|
|||
statsMessage.setLong("inflightCount", stats.getInflight().getCount());
|
||||
statsMessage.setLong("messagesCached", stats.getMessagesCached().getCount());
|
||||
// we are okay with the size without decimals so cast to long
|
||||
statsMessage.setLong("averageMessageSize", (long) stats.getMessageSize().getAveragePerSecond());
|
||||
statsMessage.setLong("averageMessageSize", (long) stats.getMessageSize().getAverageSize());
|
||||
statsMessage.setInt("memoryPercentUsage", dest.getMemoryUsage().getPercentUsage());
|
||||
statsMessage.setLong("memoryUsage", dest.getMemoryUsage().getUsage());
|
||||
statsMessage.setLong("memoryLimit", dest.getMemoryUsage().getLimit());
|
||||
|
|
|
@ -117,6 +117,8 @@ public class BrokerStatisticsPluginTest extends TestCase{
|
|||
assertTrue(reply.getMapNames().hasMoreElements());
|
||||
assertTrue(reply.getJMSTimestamp() > 0);
|
||||
assertEquals(Message.DEFAULT_PRIORITY, reply.getJMSPriority());
|
||||
assertTrue(reply.getLong("averageMessageSize") > 0);
|
||||
|
||||
/*
|
||||
for (Enumeration e = reply.getMapNames();e.hasMoreElements();) {
|
||||
String name = e.nextElement().toString();
|
||||
|
|
Loading…
Reference in New Issue