Class SimpleStatistics
java.lang.Object
com.google.code.yanf4j.statistics.impl.SimpleStatistics
- All Implemented Interfaces:
Statistics
A simple statistics implementation
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AtomicLongprivate AtomicLongprivate AtomicLongprivate doubleprivate AtomicLongprivate AtomicLongprivate doubleprivate booleanprivate longprivate longprivate AtomicLongprivate AtomicLong -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubledoublelongdoublefinal doublelonglongdoublelongdoubledoublelonglonglongdoublelongbooleanCheck session if receive bytes per second is over flow controllbooleanCheck session if receive bytes per second is over flow controllbooleanvoidreset()voidrestart()voidsetReceiveThroughputLimit(double receivePacketRate) voidsetSendThroughputLimit(double sendThroughputLimit) voidstart()voidvoidstatisticsProcess(long n) voidstatisticsRead(long n) voidstatisticsWrite(long n) voidstop()
-
Field Details
-
started
private boolean started -
receiveThroughputLimit
private double receiveThroughputLimit -
sendThroughputLimit
private double sendThroughputLimit -
startTime
private long startTime -
stopTime
private long stopTime -
recvMessageCount
-
recvMessageTotalSize
-
writeMessageCount
-
writeMessageTotalSize
-
processMessageCount
-
acceptCount
-
processMessageTotalTime
-
-
Constructor Details
-
SimpleStatistics
public SimpleStatistics()
-
-
Method Details
-
isStatistics
public boolean isStatistics()- Specified by:
isStatisticsin interfaceStatistics
-
reset
public void reset()- Specified by:
resetin interfaceStatistics
-
setReceiveThroughputLimit
public void setReceiveThroughputLimit(double receivePacketRate) - Specified by:
setReceiveThroughputLimitin interfaceStatistics
-
isReceiveOverFlow
public boolean isReceiveOverFlow()Check session if receive bytes per second is over flow controll- Specified by:
isReceiveOverFlowin interfaceStatistics- Returns:
-
isSendOverFlow
public boolean isSendOverFlow()Check session if receive bytes per second is over flow controll- Specified by:
isSendOverFlowin interfaceStatistics- Returns:
-
getSendThroughputLimit
public double getSendThroughputLimit()- Specified by:
getSendThroughputLimitin interfaceStatistics
-
setSendThroughputLimit
public void setSendThroughputLimit(double sendThroughputLimit) - Specified by:
setSendThroughputLimitin interfaceStatistics
-
getReceiveThroughputLimit
public final double getReceiveThroughputLimit()- Specified by:
getReceiveThroughputLimitin interfaceStatistics
-
restart
public void restart()- Specified by:
restartin interfaceStatistics
-
getStartedTime
public long getStartedTime()- Specified by:
getStartedTimein interfaceStatistics
-
getProcessedMessageAverageTime
public double getProcessedMessageAverageTime()- Specified by:
getProcessedMessageAverageTimein interfaceStatistics
-
getProcessedMessageCount
public long getProcessedMessageCount()- Specified by:
getProcessedMessageCountin interfaceStatistics
-
statisticsProcess
public void statisticsProcess(long n) - Specified by:
statisticsProcessin interfaceStatistics
-
start
public void start()- Specified by:
startin interfaceStatistics
-
stop
public void stop()- Specified by:
stopin interfaceStatistics
-
statisticsRead
public void statisticsRead(long n) - Specified by:
statisticsReadin interfaceStatistics
-
getRecvMessageCount
public long getRecvMessageCount()- Specified by:
getRecvMessageCountin interfaceStatistics
-
getRecvMessageTotalSize
public long getRecvMessageTotalSize()- Specified by:
getRecvMessageTotalSizein interfaceStatistics
-
getWriteMessageCount
public long getWriteMessageCount()- Specified by:
getWriteMessageCountin interfaceStatistics
-
getWriteMessageTotalSize
public long getWriteMessageTotalSize()- Specified by:
getWriteMessageTotalSizein interfaceStatistics
-
statisticsWrite
public void statisticsWrite(long n) - Specified by:
statisticsWritein interfaceStatistics
-
getRecvMessageAverageSize
public long getRecvMessageAverageSize()- Specified by:
getRecvMessageAverageSizein interfaceStatistics
-
getRecvMessageCountPerSecond
public double getRecvMessageCountPerSecond()- Specified by:
getRecvMessageCountPerSecondin interfaceStatistics
-
getWriteMessageCountPerSecond
public double getWriteMessageCountPerSecond()- Specified by:
getWriteMessageCountPerSecondin interfaceStatistics
-
getWriteMessageAverageSize
public long getWriteMessageAverageSize()- Specified by:
getWriteMessageAverageSizein interfaceStatistics
-
getAcceptCountPerSecond
public double getAcceptCountPerSecond()- Specified by:
getAcceptCountPerSecondin interfaceStatistics
-
getReceiveBytesPerSecond
public double getReceiveBytesPerSecond()- Specified by:
getReceiveBytesPerSecondin interfaceStatistics
-
getSendBytesPerSecond
public double getSendBytesPerSecond()- Specified by:
getSendBytesPerSecondin interfaceStatistics
-
statisticsAccept
public void statisticsAccept()- Specified by:
statisticsAcceptin interfaceStatistics
-