Author: fhanik
Date: Thu May 18 19:08:54 2006
New Revision: 407687

URL: http://svn.apache.org/viewvc?rev=407687&view=rev
Log:
fixed bug

Modified:
    
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java?rev=407687&r1=407686&r2=407687&view=diff
==============================================================================
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
 Thu May 18 19:08:54 2006
@@ -43,7 +43,7 @@
     double mbRx = 0;
     double timeTx = 0;
     AtomicLong msgTxCnt = new AtomicLong(1);
-    AtomicLong msgRxCnt = new AtomicLong(1);
+    AtomicLong msgRxCnt = new AtomicLong(0);
     AtomicLong msgTxErr = new AtomicLong(0);
     int interval = 10000;
     AtomicInteger access = new AtomicInteger(0);
@@ -83,8 +83,10 @@
     public void messageReceived(ChannelMessage msg) {
         long bytes = 
XByteBuffer.getDataPackageLength(((ChannelData)msg).getDataPackageLength());
         mbRx += ((double)bytes)/(1024d*1024d);
-        if ( msgRxCnt.get() % interval == 0 ) report(timeTx);
         msgRxCnt.addAndGet(1);
+        if ( msgRxCnt.get() % interval == 0 ) report(timeTx);
+        super.messageReceived(msg);
+        
     }
     
     public void report(double timeTx) {



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to