Package com.predic8.membrane.core.rules
Class StatisticCollector
java.lang.Object
com.predic8.membrane.core.rules.StatisticCollector
StatisticCollector counts Exchange objects, tracks the time they took
to complete, the number of bytes they sent, and some more numbers.
Instances are not thread-safe.
-
Constructor Details
-
StatisticCollector
public StatisticCollector(boolean countErrorExchanges) - Parameters:
countErrorExchanges- whether to count failed Exchange objects. SinceAbstractHttpHandlercounts Exchanges before their state is set to completed (andAbstractExchange.getStatus()still returnsExchangeState.FAILED, we need to be able to count them as successful (and track their statistics). On the other handMemoryExchangeStoreneeds to count failures as failures, and does not track their values.
-
-
Method Details
-
collectFrom
-
collectFrom
-
getCount
public int getCount() -
getGoodCount
public int getGoodCount() -
getMinTime
-
getMaxTime
-
getAvgTime
-
getGoodTotalTime
public long getGoodTotalTime() -
getGoodTotalBytesReceived
public long getGoodTotalBytesReceived() -
getGoodTotalBytesSent
public long getGoodTotalBytesSent() -
getBytesSent
-
getBytesReceived
-
toString
-
getErrorCount
-