facebook4j.management
Class InvocationStatisticsCalculator
java.lang.Object
facebook4j.management.InvocationStatisticsCalculator
- All Implemented Interfaces:
- InvocationStatistics
public class InvocationStatisticsCalculator
- extends Object
- implements InvocationStatistics
Object that collects/aggregates statistics for the invocation of a given method.
- Author:
- Nick Dellamaggiore (nick.dellamaggiore gmail.com)
InvocationStatisticsCalculator
public InvocationStatisticsCalculator(String name,
int historySize)
- Parameters:
name - the name of this API methodhistorySize - the number of calls to track (for invocation time averaging)
increment
public void increment(long time,
boolean success)
getName
public String getName()
- Specified by:
getName in interface InvocationStatistics
getCallCount
public long getCallCount()
- Specified by:
getCallCount in interface InvocationStatistics
getErrorCount
public long getErrorCount()
- Specified by:
getErrorCount in interface InvocationStatistics
getTotalTime
public long getTotalTime()
- Specified by:
getTotalTime in interface InvocationStatistics
getAverageTime
public long getAverageTime()
- Specified by:
getAverageTime in interface InvocationStatistics
reset
public void reset()
- Specified by:
reset in interface InvocationStatistics
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2019. All rights reserved.