cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1487180 - in /cxf/branches/2.5.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 Wed, 29 May 2013 01:16:26 GMT
Author: ffang
Date: Wed May 29 01:16:26 2013
New Revision: 1487180

URL: http://svn.apache.org/r1487180
Log:
Merged revisions 1486849 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes

................
  r1486849 | ffang | 2013-05-28 18:05:40 +0800 (二, 28  5 2013) | 16 lines
  
  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.5.x-fixes/   (props changed)
    cxf/branches/2.5.x-fixes/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounter.java
    cxf/branches/2.5.x-fixes/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounterMBean.java

Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Wed May 29 01:16:26 2013
@@ -0,0 +1,3 @@
+/cxf/branches/2.6.x-fixes:1486849
+/cxf/branches/2.7.x-fixes:1486847
+/cxf/trunk:1486838

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

Modified: cxf/branches/2.5.x-fixes/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounter.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounter.java?rev=1487180&r1=1487179&r2=1487180&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounter.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounter.java
Wed May 29 01:16:26 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.5.x-fixes/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounterMBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounterMBean.java?rev=1487180&r1=1487179&r2=1487180&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounterMBean.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounterMBean.java
Wed May 29 01:16:26 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