cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1486849 - in /cxf/branches/2.6.x-fixes: ./ rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounter.java rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounterMBean.java
Date Tue, 28 May 2013 10:05:40 GMT
Author: ffang
Date: Tue May 28 10:05:40 2013
New Revision: 1486849

URL: http://svn.apache.org/r1486849
Log:
Merged revisions 1486847 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes

................
  r1486847 | ffang | 2013-05-28 18:02:25 +0800 (二, 28  5 2013) | 9 lines
  
  Merged revisions 1486838 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1486838 | ffang | 2013-05-28 17:49:10 +0800 (二, 28  5 2013) | 1 line
    
    [CXF-5016]ArithmeticException on ResponseTimeCounterMBean.getAvgResponseTime() after counter
reset() 
  ........
................

Modified:
    cxf/branches/2.6.x-fixes/   (props changed)
    cxf/branches/2.6.x-fixes/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounter.java
    cxf/branches/2.6.x-fixes/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounterMBean.java

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/branches/2.7.x-fixes:r1486847
  Merged /cxf/trunk:r1486838

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.6.x-fixes/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounter.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounter.java?rev=1486849&r1=1486848&r2=1486849&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounter.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounter.java
Tue May 28 10:05:40 2013
@@ -102,6 +102,9 @@ public class ResponseTimeCounter impleme
     }
 
     public Number getAvgResponseTime() {        
+        if (invocations.get() == 0) {
+            return -1; //return -1 if invocation number is 0;
+        }
         return (int)(totalHandlingTime / invocations.get());
     }
     

Modified: cxf/branches/2.6.x-fixes/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounterMBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounterMBean.java?rev=1486849&r1=1486848&r2=1486849&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounterMBean.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounterMBean.java
Tue May 28 10:05:40 2013
@@ -24,6 +24,12 @@ public interface ResponseTimeCounterMBea
     Number getNumLogicalRuntimeFaults();
     Number getNumRuntimeFaults();
     Number getNumUnCheckedApplicationFaults();
+    
+    /**
+     * Get the Average Response Time
+     * NOTE: if the invocation number is 0, this method
+     * will return -1
+     */
     Number getAvgResponseTime();
     Number getMaxResponseTime();
     Number getMinResponseTime();   



Mime
View raw message