You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2013/02/07 20:15:25 UTC
svn commit: r1443669 -
/activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/IntMetricCounter.scala
Author: chirino
Date: Thu Feb 7 19:15:25 2013
New Revision: 1443669
URL: http://svn.apache.org/r1443669
Log:
Fixes: APLO-295: Incorrect message_load_batch_size.max
Modified:
activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/IntMetricCounter.scala
Modified: activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/IntMetricCounter.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/IntMetricCounter.scala?rev=1443669&r1=1443668&r2=1443669&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/IntMetricCounter.scala (original)
+++ activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/IntMetricCounter.scala Thu Feb 7 19:15:25 2013
@@ -31,11 +31,15 @@ class IntMetricCounter extends MetricPro
private var count = 0
def apply(reset: Boolean):IntMetric = {
- val rc = IntMetric(count, total, min, max)
- if (reset) {
- clear()
+ if( count == 0 ) {
+ IntMetric(0, 0, 0, 0)
+ } else {
+ val rc = IntMetric(count, total, min, max)
+ if (reset) {
+ clear()
+ }
+ rc
}
- rc
}
def clear() = {