Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package org.apache.activemq.broker.region;

import java.util.Set;

import org.apache.activemq.management.CountStatisticImpl;
import org.apache.activemq.management.StatsImpl;

Expand All @@ -35,8 +37,7 @@ public ConnectionStatistics() {
enqueues = new CountStatisticImpl("enqueues", "The number of messages that have been sent to the connection");
dequeues = new CountStatisticImpl("dequeues", "The number of messages that have been dispatched from the connection");

addStatistic("enqueues", enqueues);
addStatistic("dequeues", dequeues);
addStatistics(Set.of(enqueues, dequeues));
}

public CountStatisticImpl getEnqueues() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package org.apache.activemq.broker.region;

import java.util.Set;

import org.apache.activemq.management.CountStatisticImpl;
import org.apache.activemq.management.PollCountStatisticImpl;
import org.apache.activemq.management.StatsImpl;
Expand All @@ -42,11 +44,7 @@ public ConnectorStatistics() {
messages = new CountStatisticImpl("messages", "The number of messages that that are being held by the destination");
messagesCached = new PollCountStatisticImpl("messagesCached", "The number of messages that are held in the destination's memory cache");

addStatistic("enqueues", enqueues);
addStatistic("dequeues", dequeues);
addStatistic("consumers", consumers);
addStatistic("messages", messages);
addStatistic("messagesCached", messagesCached);
addStatistics(Set.of(enqueues, dequeues, consumers, messages, messagesCached));
}

public CountStatisticImpl getEnqueues() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package org.apache.activemq.broker.region;

import java.util.Set;

import org.apache.activemq.management.CountStatisticImpl;
import org.apache.activemq.management.StatsImpl;

Expand All @@ -41,9 +43,7 @@ public RegionStatistics(boolean enabled) {
destinations = new CountStatisticImpl("destinations", "The number of regular (non-adivsory) destinations in the region");
allDestinations = new CountStatisticImpl("allDestinations", "The total number of destinations, including advisory destinations, in the region");

addStatistic("advisoryDestinations", advisoryDestinations);
addStatistic("destinations", destinations);
addStatistic("allDestinations", allDestinations);
addStatistics(Set.of(advisoryDestinations, destinations, allDestinations));

this.setEnabled(enabled);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package org.apache.activemq.broker.region;

import java.util.Set;

import org.apache.activemq.management.CountStatisticImpl;
import org.apache.activemq.management.SizeStatisticImpl;
import org.apache.activemq.management.StatsImpl;
Expand Down Expand Up @@ -45,11 +47,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, dequeues, inflightMessageSize));

this.setEnabled(enabled);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package org.apache.activemq.network;

import java.util.Set;

import org.apache.activemq.management.CountStatisticImpl;
import org.apache.activemq.management.StatsImpl;

Expand All @@ -34,9 +36,7 @@ public NetworkBridgeStatistics() {
dequeues = new CountStatisticImpl("dequeues", "The current number of dequeues this bridge has, which is the number of messages received by the remote broker.");
receivedCount = new CountStatisticImpl("receivedCount", "The number of messages that have been received by the NetworkBridge from the remote broker. Only applies for Duplex bridges.");

addStatistic("enqueues", enqueues);
addStatistic("dequeues", dequeues);
addStatistic("receivedCount", receivedCount);
addStatistics(Set.of(enqueues, dequeues, receivedCount));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package org.apache.activemq.store;

import java.util.Set;

import org.apache.activemq.management.CountStatisticImpl;
import org.apache.activemq.management.SizeStatisticImpl;
import org.apache.activemq.management.StatsImpl;
Expand All @@ -37,8 +39,7 @@ protected AbstractMessageStoreStatistics(boolean enabled, String countDescriptio
messageCount = new CountStatisticImpl("messageCount", countDescription);
messageSize = new SizeStatisticImpl("messageSize", sizeDescription);

addStatistic("messageCount", messageCount);
addStatistic("messageSize", messageSize);
addStatistics(Set.of(messageCount, messageSize));

this.setEnabled(enabled);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package org.apache.activemq.store;

import java.util.Set;

import org.apache.activemq.management.CountStatisticImpl;
import org.apache.activemq.management.SizeStatisticImpl;
import org.apache.activemq.management.StatsImpl;
Expand All @@ -39,8 +41,7 @@ public MessageStoreStatistics(boolean enabled) {
messageCount = new CountStatisticImpl("messageCount", "The number of messages in the store passing through the destination");
messageSize = new SizeStatisticImpl("messageSize","Size of messages in the store passing through the destination");

addStatistic("messageCount", messageCount);
addStatistic("messageSize", messageSize);
addStatistics(Set.of(messageCount, messageSize));

this.setEnabled(enabled);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*/
package org.apache.activemq.store;

import java.util.Set;

import org.apache.activemq.management.StatsImpl;
import org.apache.activemq.management.TimeStatisticImpl;

Expand All @@ -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);

addStatistics(Set.of(slowCleanupTime, slowWriteTime, 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(writeTime, readTime));
}

public void addSlowCleanupTime(final long time) {
Expand Down
Loading