Interface PEPeerStats
- All Known Implementing Classes:
PEPeerControlImpl.MyPeerStats, PEPeerStatsImpl
public interface PEPeerStats
Provides peer statistics.
It uses Average to compute its different averages.
-
Method Summary
Modifier and TypeMethodDescriptionvoidbytesDiscarded(int num_bytes) The given number of bytes received from the peer were discarded.voiddataBytesReceived(long num_bytes) The given number of data (payload) bytes have been received from the peer.voiddataBytesSent(long num_bytes) The given number of data (payload) bytes have been sent to the peer.voiddiskReadComplete(long bytes) Disk access stats methodsintlongGet the the average bytes-per-second speed that we are receiving piece data from the peer.longGet the the average bytes-per-second speed that we are sending piece data to the peer.intlongGet the estimated total download rate of the peer.longlongGet the estimated total upload rate of the peer.getPeer()longlonglongGet the the average bytes-per-second speed that we are receiving protocol messages from the peer.longGet the the average bytes-per-second speed that we are sending protocol messages to the peer.longGet the the longer-average bytes-per-second speed at which the peer is uploading data to us.longGet the total number of discarded bytes received from the peer.longGet the number of bytes downloaded in total by this peer (includes data downloaded from all other peers).longGet the total number of data (payload) bytes received from the peer.longGet the total number of data (payload) bytes sent to the peer.longintlongGet the total number of protocol (overhead) bytes received from the peer.longGet the total number of protocol (overhead) bytes sent to the peer.intvoidhasNewPiece(int piece_size) The peer has completed a piece of the given byte size.voidpermittedReceiveBytesUsed(int num) voidpermittedSendBytesUsed(int num) voidprotocolBytesReceived(long num_bytes) The given number of protocol (overhead) bytes have been received from the peer.voidprotocolBytesSent(long num_bytes) The given number of protocol (overhead) bytes have been sent to the peer.voidsetDownloadRateLimitBytesPerSecond(int bytes) voidvoidsetUploadRateLimitBytesPerSecond(int bytes) voidstatisticalSentPiece(int piece_size) The peer has statistically sent a piecce of the given byte size.
-
Method Details
-
getPeer
PEPeer getPeer() -
setPeer
-
dataBytesSent
void dataBytesSent(long num_bytes) The given number of data (payload) bytes have been sent to the peer.- Parameters:
num_bytes-
-
protocolBytesSent
void protocolBytesSent(long num_bytes) The given number of protocol (overhead) bytes have been sent to the peer.- Parameters:
num_bytes-
-
dataBytesReceived
void dataBytesReceived(long num_bytes) The given number of data (payload) bytes have been received from the peer.- Parameters:
num_bytes-
-
protocolBytesReceived
void protocolBytesReceived(long num_bytes) The given number of protocol (overhead) bytes have been received from the peer.- Parameters:
num_bytes-
-
bytesDiscarded
void bytesDiscarded(int num_bytes) The given number of bytes received from the peer were discarded.- Parameters:
num_bytes-
-
hasNewPiece
void hasNewPiece(int piece_size) The peer has completed a piece of the given byte size.- Parameters:
piece_size-
-
statisticalSentPiece
void statisticalSentPiece(int piece_size) The peer has statistically sent a piecce of the given byte size.- Parameters:
piece_size-
-
getDataReceiveRate
long getDataReceiveRate()Get the the average bytes-per-second speed that we are receiving piece data from the peer.- Returns:
- average speed.
-
getProtocolReceiveRate
long getProtocolReceiveRate()Get the the average bytes-per-second speed that we are receiving protocol messages from the peer.- Returns:
- average speed.
-
getTotalDataBytesReceived
long getTotalDataBytesReceived()Get the total number of data (payload) bytes received from the peer.- Returns:
- total
-
getTotalProtocolBytesReceived
long getTotalProtocolBytesReceived()Get the total number of protocol (overhead) bytes received from the peer.- Returns:
- total
-
getDataSendRate
long getDataSendRate()Get the the average bytes-per-second speed that we are sending piece data to the peer.- Returns:
- average speed.
-
getProtocolSendRate
long getProtocolSendRate()Get the the average bytes-per-second speed that we are sending protocol messages to the peer.- Returns:
- average speed.
-
getTotalDataBytesSent
long getTotalDataBytesSent()Get the total number of data (payload) bytes sent to the peer.- Returns:
- total
-
getTotalProtocolBytesSent
long getTotalProtocolBytesSent()Get the total number of protocol (overhead) bytes sent to the peer.- Returns:
- total
-
getSmoothDataReceiveRate
long getSmoothDataReceiveRate()Get the the longer-average bytes-per-second speed at which the peer is uploading data to us.- Returns:
- average speed
-
getTotalBytesDiscarded
long getTotalBytesDiscarded()Get the total number of discarded bytes received from the peer.- Returns:
- total discarded
-
getEstimatedDownloadRateOfPeer
long getEstimatedDownloadRateOfPeer()Get the estimated total download rate of the peer.- Returns:
- estimated rate in bytes-per-second
-
getEstimatedUploadRateOfPeer
long getEstimatedUploadRateOfPeer()Get the estimated total upload rate of the peer.- Returns:
- estimated rate in bytes-per-second
-
getEstimatedSecondsToCompletion
long getEstimatedSecondsToCompletion() -
getTotalBytesDownloadedByPeer
long getTotalBytesDownloadedByPeer()Get the number of bytes downloaded in total by this peer (includes data downloaded from all other peers).- Returns:
- total download bytes done
-
diskReadComplete
void diskReadComplete(long bytes) Disk access stats methods- Parameters:
bytes-
-
getTotalDiskReadCount
int getTotalDiskReadCount() -
getAggregatedDiskReadCount
int getAggregatedDiskReadCount() -
getTotalDiskReadBytes
long getTotalDiskReadBytes() -
setUploadRateLimitBytesPerSecond
void setUploadRateLimitBytesPerSecond(int bytes) -
setDownloadRateLimitBytesPerSecond
void setDownloadRateLimitBytesPerSecond(int bytes) -
getUploadRateLimitBytesPerSecond
int getUploadRateLimitBytesPerSecond() -
getDownloadRateLimitBytesPerSecond
int getDownloadRateLimitBytesPerSecond() -
getPermittedBytesToSend
long getPermittedBytesToSend() -
permittedSendBytesUsed
void permittedSendBytesUsed(int num) -
getPermittedBytesToReceive
long getPermittedBytesToReceive() -
permittedReceiveBytesUsed
void permittedReceiveBytesUsed(int num)
-