qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kgiu...@apache.org
Subject svn commit: r1076329 - in /qpid/trunk/qpid: cpp/src/qpid/broker/QueueFlowLimit.cpp cpp/src/tests/queue_flow_limit_tests.py java/broker/src/main/java/org/apache/qpid/qmf/QMFService.java specs/management-schema.xml
Date Wed, 02 Mar 2011 19:02:00 GMT
Author: kgiusti
Date: Wed Mar  2 19:02:00 2011
New Revision: 1076329

URL: http://svn.apache.org/viewvc?rev=1076329&view=rev
Log:
QPID-3081: add statistic for queue flow control transitions

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/QueueFlowLimit.cpp
    qpid/trunk/qpid/cpp/src/tests/queue_flow_limit_tests.py
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFService.java
    qpid/trunk/qpid/specs/management-schema.xml

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/QueueFlowLimit.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/QueueFlowLimit.cpp?rev=1076329&r1=1076328&r2=1076329&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/QueueFlowLimit.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/QueueFlowLimit.cpp Wed Mar  2 19:02:00 2011
@@ -138,8 +138,10 @@ void QueueFlowLimit::enqueued(const Queu
             flowStopped = true;
             QPID_LOG(info, "Queue \"" << queueName << "\": has reached " <<
flowStopSize << " enqueued bytes. Producer flow control activated." );
         }
-        if (flowStopped && queueMgmtObj)
+        if (flowStopped && queueMgmtObj) {
             queueMgmtObj->set_flowStopped(true);
+            queueMgmtObj->inc_flowStoppedCount();
+        }
     }
 
     /** @todo KAG: - REMOVE ONCE STABLE */

Modified: qpid/trunk/qpid/cpp/src/tests/queue_flow_limit_tests.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/queue_flow_limit_tests.py?rev=1076329&r1=1076328&r2=1076329&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/queue_flow_limit_tests.py (original)
+++ qpid/trunk/qpid/cpp/src/tests/queue_flow_limit_tests.py Wed Mar  2 19:02:00 2011
@@ -137,12 +137,12 @@ class QueueFlowLimitTests(TestBase010):
         """
         self.startQmf();
         oid = self._create_queue("test-q", stop_count=373, resume_count=229)
+        self.assertEqual(self.qmf.getObjects(_objectId=oid)[0].flowStoppedCount, 0)
 
         sndr1 = self._start_qpid_send("test-q", count=1213, content="XXX", capacity=50);
         sndr2 = self._start_qpid_send("test-q", count=797, content="Y", capacity=13);
         sndr3 = self._start_qpid_send("test-q", count=331, content="ZZZZZ", capacity=149);
         totalMsgs = 1213 + 797 + 331
-        
 
         # wait until flow control is active
         count = 0
@@ -180,6 +180,7 @@ class QueueFlowLimitTests(TestBase010):
 
         self.assertEqual(count, totalMsgs)
         self.failIf(self.qmf.getObjects(_objectId=oid)[0].flowStopped)
+        self.failUnless(self.qmf.getObjects(_objectId=oid)[0].flowStoppedCount)
 
         self._delete_queue("test-q")
 

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFService.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFService.java?rev=1076329&r1=1076328&r2=1076329&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFService.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFService.java Wed Mar
 2 19:02:00 2011
@@ -1096,6 +1096,11 @@ public class QMFService implements Confi
             return Boolean.FALSE;
         }
 
+        public Long getFlowStoppedCount()
+        {
+            return 0L;
+        }
+
         public BrokerSchema.QueueClass.PurgeMethodResponseCommand purge(final BrokerSchema.QueueClass.PurgeMethodResponseCommandFactory
factory,
                                                                         final Long request)
         {

Modified: qpid/trunk/qpid/specs/management-schema.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/specs/management-schema.xml?rev=1076329&r1=1076328&r2=1076329&view=diff
==============================================================================
--- qpid/trunk/qpid/specs/management-schema.xml (original)
+++ qpid/trunk/qpid/specs/management-schema.xml Wed Mar  2 19:02:00 2011
@@ -176,6 +176,7 @@
     <statistic name="unackedMessages"     type="hilo32"   unit="message"     desc="Messages
consumed but not yet acked"/>
     <statistic name="messageLatency"      type="mmaTime"  unit="nanosecond"  desc="Broker
latency through this queue"/>
     <statistic name="flowStopped"         type="bool"     desc="Flow control active."/>
+    <statistic name="flowStoppedCount"    type="count32"  desc="Number of times flow control
was activated for this queue"/>
 
     <method name="purge" desc="Discard all or some messages on a queue">
       <arg name="request" dir="I" type="uint32" desc="0 for all messages or n>0 for
n messages"/>



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message