You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2017/09/11 21:57:14 UTC
[1/2] qpid-broker-j git commit: QPID-7771: [Java Broker] Improve
managed statistic descriptions
Repository: qpid-broker-j
Updated Branches:
refs/heads/master 888c9d707 -> 82495db3a
QPID-7771: [Java Broker] Improve managed statistic descriptions
Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/1c71e666
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/1c71e666
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/1c71e666
Branch: refs/heads/master
Commit: 1c71e6669716efc8ae23f73ada54c5f40c1ce81f
Parents: 888c9d7
Author: Keith Wall <ke...@gmail.com>
Authored: Mon Sep 11 22:19:33 2017 +0100
Committer: Keith Wall <ke...@gmail.com>
Committed: Mon Sep 11 22:19:33 2017 +0100
----------------------------------------------------------------------
.../org/apache/qpid/server/model/Broker.java | 23 +++++--
.../apache/qpid/server/model/Connection.java | 24 +++++--
.../org/apache/qpid/server/model/Exchange.java | 7 +-
.../org/apache/qpid/server/model/Queue.java | 68 +++++++++++++-------
.../apache/qpid/server/model/port/AmqpPort.java | 3 +-
.../virtualhost/QueueManagingVirtualHost.java | 45 +++++++++----
.../src/main/java/resources/showConnection.html | 2 +-
7 files changed, 125 insertions(+), 47 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/1c71e666/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java
----------------------------------------------------------------------
diff --git a/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java b/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java
index 5749b74..7480f8c 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java
@@ -183,16 +183,24 @@ public interface Broker<X extends Broker<X>> extends ConfiguredObject<X>, EventL
@DerivedAttribute( persist = true )
String getModelVersion();
- @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Inbound")
+ @SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Inbound",
+ description = "Total size of all messages received by the Broker.")
long getBytesIn();
- @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Outbound")
+ @SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Outbound",
+ description = "Total size of all messages delivered by the Broker.")
long getBytesOut();
- @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.MESSAGES, label = "Inbound")
+ @SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.MESSAGES, label = "Inbound",
+ description = "Total number of messages received by the Broker.")
long getMessagesIn();
- @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.MESSAGES, label = "Outbound")
+ @SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.MESSAGES, label = "Outbound",
+ description = "Total number of messages delivered by the Broker.")
long getMessagesOut();
@ManagedOperation(nonModifying = true,
@@ -221,42 +229,49 @@ public interface Broker<X extends Broker<X>> extends ConfiguredObject<X>, EventL
@DerivedAttribute(description = "URL to broker documentation")
String getDocumentationUrl();
+ @SuppressWarnings("unused")
@ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME,
units = StatisticUnit.COUNT,
label = "Live threads",
description = "Number of live threads")
int getNumberOfLiveThreads();
+ @SuppressWarnings("unused")
@ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME,
units = StatisticUnit.BYTES,
label = "Used Heap Memory Size",
description = "Size of used heap memory")
long getUsedHeapMemorySize();
+ @SuppressWarnings("unused")
@ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME,
units = StatisticUnit.BYTES,
label = "Used Direct Memory Size",
description = "Size of used direct memory")
long getUsedDirectMemorySize();
+ @SuppressWarnings("unused")
@ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME,
units = StatisticUnit.BYTES,
label = "Direct Memory Total Capacity",
description = "Total capacity of direct memory allocated for the Broker process")
long getDirectMemoryTotalCapacity();
+ @SuppressWarnings("unused")
@ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME,
units = StatisticUnit.COUNT,
label = "Number Of Object Pending Finalization",
description = "Number of objects pending finalization")
int getNumberOfObjectsPendingFinalization();
+ @SuppressWarnings("unused")
@ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME,
units = StatisticUnit.COUNT,
label = "Number of Active Pooled Buffers",
description = "Number of pooled buffers in use.")
long getNumberOfActivePooledBuffers();
+ @SuppressWarnings("unused")
@ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME,
units = StatisticUnit.COUNT,
label = "Number of Pooled Buffers",
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/1c71e666/broker-core/src/main/java/org/apache/qpid/server/model/Connection.java
----------------------------------------------------------------------
diff --git a/broker-core/src/main/java/org/apache/qpid/server/model/Connection.java b/broker-core/src/main/java/org/apache/qpid/server/model/Connection.java
index 0f62a0b..95db723 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/model/Connection.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/model/Connection.java
@@ -115,24 +115,36 @@ public interface Connection<X extends Connection<X>> extends ConfiguredObject<X>
// currently this reports inbound message content size without header.
// See also QPID-7689: https://issues.apache.org/jira/browse/QPID-7689?focusedCommentId=16022923#comment-16022923
- @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Inbound")
+ @SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Inbound",
+ description = "Total size of all messages received by this connection.")
long getBytesIn();
// currently this reports outbound message content size without header.
// See also QPID-7689: https://issues.apache.org/jira/browse/QPID-7689?focusedCommentId=16022923#comment-16022923
- @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Outbound")
+ @SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Outbound",
+ description = "Total size of all messages delivered by this connection.")
long getBytesOut();
- @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.MESSAGES, label = "Inbound")
+ @SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.MESSAGES, label = "Inbound",
+ description = "Total number of messages delivered by this connection.")
long getMessagesIn();
- @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.MESSAGES, label = "Outbound")
+ @SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.MESSAGES, label = "Outbound",
+ description = "Total number of messages received by this connection.")
long getMessagesOut();
- @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.ABSOLUTE_TIME, label = "Last I/O time")
+ @SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.ABSOLUTE_TIME, label = "Last I/O time",
+ description = "Time of last I/O operation performed by this connection.")
Date getLastIoTime();
- @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.COUNT, label = "Sessions")
+ @SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.COUNT, label = "Sessions",
+ description = "Current number of sessions belonging to this connection.")
int getSessionCount();
//children
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/1c71e666/broker-core/src/main/java/org/apache/qpid/server/model/Exchange.java
----------------------------------------------------------------------
diff --git a/broker-core/src/main/java/org/apache/qpid/server/model/Exchange.java b/broker-core/src/main/java/org/apache/qpid/server/model/Exchange.java
index 1603f6d..2b5614b 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/model/Exchange.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/model/Exchange.java
@@ -72,22 +72,27 @@ public interface Exchange<X extends Exchange<X>> extends ConfiguredObject<X>, Me
CreatingLinkInfo getCreatingLinkInfo();
// Statistics
+ @SuppressWarnings("unused")
@ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.COUNT, label = "Bindings",
- description = "Number of bindings to this exchange.")
+ description = "Current number of bindings to this exchange.")
long getBindingCount();
+ @SuppressWarnings("unused")
@ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Dropped",
description = "Total size of all unroutable messages dropped by this exchange.")
long getBytesDropped();
+ @SuppressWarnings("unused")
@ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Inbound",
description = "Total size of messages received by this exchange.")
long getBytesIn();
+ @SuppressWarnings("unused")
@ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.MESSAGES, label = "Dropped",
description = "Number of unroutable messages dropped by this exchange.")
long getMessagesDropped();
+ @SuppressWarnings("unused")
@ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.MESSAGES, label = "Inbound",
description = "Number of messages received by this exchange.")
long getMessagesIn();
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/1c71e666/broker-core/src/main/java/org/apache/qpid/server/model/Queue.java
----------------------------------------------------------------------
diff --git a/broker-core/src/main/java/org/apache/qpid/server/model/Queue.java b/broker-core/src/main/java/org/apache/qpid/server/model/Queue.java
index ae34568..659abe0 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/model/Queue.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/model/Queue.java
@@ -317,89 +317,113 @@ public interface Queue<X extends Queue<X>> extends ConfiguredObject<X>,
void setNotificationListener(QueueNotificationListener listener);
@SuppressWarnings("unused")
- @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.COUNT, label = "Bindings")
+ @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.COUNT, label = "Bindings",
+ description = "Current number of bindings to this queue.")
int getBindingCount();
@SuppressWarnings("unused")
- @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.COUNT, label = "Consumers")
+ @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.COUNT, label = "Consumers",
+ description = "Current number of consumers attached to this queue.")
int getConsumerCount();
@SuppressWarnings("unused")
- @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.COUNT, label = "Consumers with credit")
+ @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.COUNT, label = "Consumers with credit",
+ description = "Current number of consumers attached to this queue with credit")
int getConsumerCountWithCredit();
@SuppressWarnings("unused")
- @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Delivered (Persistent)")
+ @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Delivered (Persistent)",
+ description = "Total size of all persistent messages delivered by this queue.")
long getPersistentDequeuedBytes();
@SuppressWarnings("unused")
- @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.MESSAGES, label = "Delivered (Persistent)")
+ @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.MESSAGES, label = "Delivered (Persistent)",
+ description = "Total number of persistent messages delivered by this queue.")
long getPersistentDequeuedMessages();
@SuppressWarnings("unused")
- @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Enqueued (Persistent)")
+ @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Enqueued (Persistent)",
+ description = "Total size of all persistent messages received by this queue.")
long getPersistentEnqueuedBytes();
@SuppressWarnings("unused")
- @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.MESSAGES, label = "Enqueued (Persistent)")
+ @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.MESSAGES, label = "Enqueued (Persistent)",
+ description = "Total number of persistent messages received by this queue.")
long getPersistentEnqueuedMessages();
- @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.BYTES, label = "Queue Depth")
+ @SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.BYTES, label = "Queue Depth",
+ description = "Current size of all messages enqueued by this queue.")
long getQueueDepthBytes();
- @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.MESSAGES, label = "Queue Depth")
+ @SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.MESSAGES, label = "Queue Depth",
+ description = "Current number of messages enqueued by this queue.")
int getQueueDepthMessages();
@SuppressWarnings("unused")
- @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Delivered")
+ @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Delivered",
+ description = "Total size of all messages delivered by this queue.")
long getTotalDequeuedBytes();
@SuppressWarnings("unused")
- @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.MESSAGES, label = "Delivered")
+ @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.MESSAGES, label = "Delivered",
+ description = "Total number of messages delivered by this queue.")
long getTotalDequeuedMessages();
@SuppressWarnings("unused")
- @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Enqueued")
+ @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Enqueued",
+ description = "Total size of all messages received by this queue.")
long getTotalEnqueuedBytes();
@SuppressWarnings("unused")
- @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.MESSAGES, label = "Enqueued")
+ @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.MESSAGES, label = "Enqueued",
+ description = "Total number of messages received by this queue.")
long getTotalEnqueuedMessages();
@SuppressWarnings("unused")
- @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.BYTES, label = "Prefetched")
+ @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.BYTES, label = "Prefetched",
+ description = "Total size of all messages currently prefetched by consumers.")
long getUnacknowledgedBytes();
@SuppressWarnings("unused")
- @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.MESSAGES, label = "Prefetched")
+ @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.MESSAGES, label = "Prefetched",
+ description = "Total number of messages currently prefetched by consumers.")
long getUnacknowledgedMessages();
@SuppressWarnings("unused")
- @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.BYTES, label = "Available")
+ @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.BYTES, label = "Available",
+ description = "Total size of all messages currently available.")
long getAvailableBytes();
@SuppressWarnings("unused")
- @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.MESSAGES, label = "Available")
+ @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.MESSAGES, label = "Available",
+ description = "Total number of messages currently available.")
int getAvailableMessages();
@SuppressWarnings("unused")
- @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.BYTES, label = "Available HWM")
+ @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.BYTES, label = "Available HWM",
+ description = "Maximum recorded size of available messages.")
long getAvailableBytesHighWatermark();
@SuppressWarnings("unused")
- @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.MESSAGES, label = "Available HWM")
+ @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.MESSAGES, label = "Available HWM",
+ description = "Maximum recorded number of available messages.")
int getAvailableMessagesHighWatermark();
@SuppressWarnings("unused")
- @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.BYTES, label = "Queue Depth HWM")
+ @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.BYTES, label = "Queue Depth HWM",
+ description = "Maximum recorded size of enqueued messages.")
long getQueueDepthBytesHighWatermark();
@SuppressWarnings("unused")
- @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.MESSAGES, label = "Queue Depth HWM")
+ @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.MESSAGES, label = "Queue Depth HWM",
+ description = "Maximum recorded number of enqueued messages.")
int getQueueDepthMessagesHighWatermark();
@SuppressWarnings("unused")
- @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.ABSOLUTE_TIME, label = "Oldest Message")
+ @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.ABSOLUTE_TIME, label = "Oldest Message",
+ description = "Current age of oldest message on the queue.")
long getOldestMessageAge();
@ManagedOperation(description = "reset cumulative and high watermark statistics values", changesConfiguredObjectState = false)
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/1c71e666/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPort.java
----------------------------------------------------------------------
diff --git a/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPort.java b/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPort.java
index b75266f..857c72d 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPort.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPort.java
@@ -148,7 +148,8 @@ public interface AmqpPort<X extends AmqpPort<X>> extends Port<X>
@ManagedAttribute( defaultValue = "${" + PORT_MAX_OPEN_CONNECTIONS + "}" )
int getMaxOpenConnections();
- @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.COUNT, label = "Connections")
+ @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.COUNT, label = "Connections",
+ description = "Current number of connections made through this port")
int getConnectionCount();
@DerivedAttribute(description = "Maximum time allowed for a new connection to send a protocol header."
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/1c71e666/broker-core/src/main/java/org/apache/qpid/server/virtualhost/QueueManagingVirtualHost.java
----------------------------------------------------------------------
diff --git a/broker-core/src/main/java/org/apache/qpid/server/virtualhost/QueueManagingVirtualHost.java b/broker-core/src/main/java/org/apache/qpid/server/virtualhost/QueueManagingVirtualHost.java
index 6dfadfd..47b8621 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/virtualhost/QueueManagingVirtualHost.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/virtualhost/QueueManagingVirtualHost.java
@@ -177,38 +177,59 @@ public interface QueueManagingVirtualHost<X extends QueueManagingVirtualHost<X>>
@ManagedAttribute( defaultValue = "[]")
List<String> getGlobalAddressDomains();
-
- @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.COUNT, label = "Queues")
+ @SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.COUNT, label = "Queues",
+ description = "Current number of queues on this virtualhost.")
long getQueueCount();
- @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.COUNT, label = "Exchanges")
+ @SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.COUNT, label = "Exchanges",
+ description = "Current number of exchanges on this virtualhost.")
long getExchangeCount();
- @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.COUNT, label = "Connections")
+ @SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.COUNT, label = "Connections",
+ description = "Current number of messaging connections made to this virtualhost.")
long getConnectionCount();
- @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Inbound")
+ @SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Inbound",
+ description = "Total size of all messages received by this virtualhost.")
long getBytesIn();
- @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Outbound")
+ @SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Outbound",
+ description = "Total size of all messages delivered by this virtualhost.")
long getBytesOut();
- @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.MESSAGES, label = "Inbound")
+ @SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.MESSAGES, label = "Inbound",
+ description = "Total number of messages received by this virtualhost.")
long getMessagesIn();
- @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.MESSAGES, label = "Outbound")
+ @SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.MESSAGES, label = "Outbound",
+ description = "Total number of messages delivered by this virtualhost.")
long getMessagesOut();
- @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.BYTES, label = "Total Depth of Queues")
+ @SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.BYTES, label = "Queue Depth",
+ description = "Current size of all messages enqueued by this virtualhost.")
long getTotalDepthOfQueuesBytes();
- @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.MESSAGES, label = "Total Depth of Queues")
+ @SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.MESSAGES, label = "Queue Depth",
+ description = "Current number of messages enqueued by this virtualhost.")
long getTotalDepthOfQueuesMessages();
- @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.BYTES, label = "Total Memory Occupied by Message Headers and Content")
+ @SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.BYTES, label = "In-Memory Message Bytes",
+ description="Current size of all messages cached in-memory.")
long getInMemoryMessageSize();
- @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Total Number of Bytes Evacuated from Memory Due to Flow to Disk")
+ @SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Evacuated Message Bytes",
+ description = "Total Number of Bytes Evacuated from Memory Due to Flow to Disk.")
long getBytesEvacuatedFromMemory();
@Override
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/1c71e666/broker-plugins/management-http/src/main/java/resources/showConnection.html
----------------------------------------------------------------------
diff --git a/broker-plugins/management-http/src/main/java/resources/showConnection.html b/broker-plugins/management-http/src/main/java/resources/showConnection.html
index 3ec9145..2d403ca 100644
--- a/broker-plugins/management-http/src/main/java/resources/showConnection.html
+++ b/broker-plugins/management-http/src/main/java/resources/showConnection.html
@@ -47,7 +47,7 @@
<div class="formLabel-labelCell">Connect Time:</div>
<div class="formValue-valueCell">
<div class="createdTime"></div>
- </div>Ÿ
+ </div>
</div>
<div class="clear">
<div class="formLabel-labelCell">Port:</div>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org
[2/2] qpid-broker-j git commit: QPID-7825: [Java Broker] Add queue
statistic counting message time-to-live expirations
Posted by kw...@apache.org.
QPID-7825: [Java Broker] Add queue statistic counting message time-to-live expirations
Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/82495db3
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/82495db3
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/82495db3
Branch: refs/heads/master
Commit: 82495db3ad3c7017f9ecca4857b133e45eb771fe
Parents: 1c71e66
Author: Keith Wall <ke...@gmail.com>
Authored: Mon Sep 11 22:56:06 2017 +0100
Committer: Keith Wall <ke...@gmail.com>
Committed: Mon Sep 11 22:56:06 2017 +0100
----------------------------------------------------------------------
.../org/apache/qpid/server/model/Queue.java | 11 ++++++++++
.../apache/qpid/server/queue/AbstractQueue.java | 14 +++++++++++++
.../qpid/server/queue/QueueStatistics.java | 22 +++++++++++++++++++-
3 files changed, 46 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/82495db3/broker-core/src/main/java/org/apache/qpid/server/model/Queue.java
----------------------------------------------------------------------
diff --git a/broker-core/src/main/java/org/apache/qpid/server/model/Queue.java b/broker-core/src/main/java/org/apache/qpid/server/model/Queue.java
index 659abe0..d0a70d1 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/model/Queue.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/model/Queue.java
@@ -382,6 +382,17 @@ public interface Queue<X extends Queue<X>> extends ConfiguredObject<X>,
long getTotalEnqueuedMessages();
@SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.BYTES, label = "Expired",
+ description = "Total size of all messages expired by message time-to-live on this queue.")
+ long getTotalExpiredBytes();
+
+ @SuppressWarnings("unused")
+ @ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = StatisticUnit.MESSAGES, label = "Expired",
+ description = "Total number of messages expired by message time-to-live on this queue.")
+ long getTotalExpiredMessages();
+
+
+ @SuppressWarnings("unused")
@ManagedStatistic(statisticType = StatisticType.POINT_IN_TIME, units = StatisticUnit.BYTES, label = "Prefetched",
description = "Total size of all messages currently prefetched by consumers.")
long getUnacknowledgedBytes();
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/82495db3/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
----------------------------------------------------------------------
diff --git a/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java b/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
index a5e5e65..416dbfd 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
@@ -2128,6 +2128,7 @@ public abstract class AbstractQueue<X extends AbstractQueue<X>>
expired = false;
if (node.acquire())
{
+ _queueStatistics.addToExpired(node.getSizeWithHeader());
dequeueEntry(node);
}
}
@@ -2199,6 +2200,7 @@ public abstract class AbstractQueue<X extends AbstractQueue<X>>
if (node.expired())
{
deleteEntry(node);
+ _queueStatistics.addToExpired(node.getSizeWithHeader());
}
else
{
@@ -2641,6 +2643,18 @@ public abstract class AbstractQueue<X extends AbstractQueue<X>>
return _maximumDeliveryAttempts;
}
+ @Override
+ public long getTotalExpiredBytes()
+ {
+ return _queueStatistics.getEnqueueSize();
+ }
+
+ @Override
+ public long getTotalExpiredMessages()
+ {
+ return _queueStatistics.getExpiredCount();
+ }
+
private void checkForNotification(final ServerMessage<?> msg,
final QueueNotificationListener listener,
final long currentTime,
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/82495db3/broker-core/src/main/java/org/apache/qpid/server/queue/QueueStatistics.java
----------------------------------------------------------------------
diff --git a/broker-core/src/main/java/org/apache/qpid/server/queue/QueueStatistics.java b/broker-core/src/main/java/org/apache/qpid/server/queue/QueueStatistics.java
index db0bd3d..c4464f7 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/queue/QueueStatistics.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/queue/QueueStatistics.java
@@ -52,6 +52,9 @@ final class QueueStatistics
private final AtomicInteger _availableCountHwm = new AtomicInteger();
private final AtomicLong _availableSizeHwm = new AtomicLong();
+ private final AtomicInteger _expiredCount = new AtomicInteger();
+ private final AtomicLong _expiredSize = new AtomicLong();
+
public final int getQueueCount()
{
return _queueCount.get();
@@ -142,6 +145,16 @@ final class QueueStatistics
return _availableSizeHwm.get();
}
+ public int getExpiredCount()
+ {
+ return _expiredCount.get();
+ }
+
+ public long getExpiredSize()
+ {
+ return _expiredSize.get();
+ }
+
void addToQueue(long size)
{
int count = _queueCount.incrementAndGet();
@@ -222,6 +235,12 @@ final class QueueStatistics
_persistentDequeueSize.addAndGet(size);
}
+ void addToExpired(final long size)
+ {
+ _expiredCount.incrementAndGet();
+ _expiredSize.addAndGet(size);
+ }
+
void reset()
{
_availableCountHwm.set(0);
@@ -236,6 +255,7 @@ final class QueueStatistics
_persistentEnqueueSize.set(0L);
_persistentDequeueCount.set(0L);
_persistentDequeueSize.set(0L);
+ _expiredCount.set(0);
+ _expiredSize.set(0);
}
-
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org