mattrpav commented on code in PR #1985:
URL: https://github.com/apache/activemq/pull/1985#discussion_r3178525547


##########
activemq-broker/src/main/java/org/apache/activemq/broker/region/SubscriptionStatistics.java:
##########
@@ -45,12 +45,7 @@ public SubscriptionStatistics(boolean enabled) {
         dequeues = new CountStatisticImpl("dequeues", "The number of messages 
that have been acknowledged from the subscription");
         inflightMessageSize = new SizeStatisticImpl("inflightMessageSize", 
"The size in bytes of messages dispatched but awaiting acknowledgement");
 
-        addStatistic("consumedCount", consumedCount);
-        addStatistic("enqueues", enqueues);
-        addStatistic("dispatched", dispatched);
-        addStatistic("dequeues", dequeues);
-        addStatistic("inflightMessageSize", inflightMessageSize);
-
+        addStatistics(Set.of(consumedCount, enqueues, dispatched, 
inflightMessageSize));

Review Comment:
   Good catch on the missing dequeues!!



##########
activemq-broker/src/main/java/org/apache/activemq/store/PersistenceAdapterStatistics.java:
##########
@@ -31,14 +33,11 @@ public PersistenceAdapterStatistics() {
        slowCleanupTime = new TimeStatisticImpl("slowCleanupTime", "Slow time 
to cleanup data in the PersistentAdapter.");
        slowWriteTime = new TimeStatisticImpl("slowWriteTime", "Slow time to 
write data to the PersistentAdapter.");
         slowReadTime = new TimeStatisticImpl("slowReadTime", "Slow time to 
read data from the PersistentAdapter.");
-        addStatistic("slowCleanupTime", slowCleanupTime);
-        addStatistic("slowWriteTime", slowWriteTime);
-        addStatistic("slowReadTime", slowReadTime);
-        
+
         writeTime = new TimeStatisticImpl("writeTime", "Time to write data to 
the PersistentAdapter.");
         readTime = new TimeStatisticImpl("readTime", "Time to read data from 
the PersistentAdapter.");
-        addStatistic("writeTime", writeTime);
-        addStatistic("readTime", readTime);
+
+        addStatistics(Set.of(slowCleanupTime,  slowWriteTime, slowReadTime, 
writeTime, readTime));

Review Comment:
   Fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to