org.gudy.azureus2.core3.peer
Interface PEPeerStats

All Known Implementing Classes:
PEPeerStatsImpl

public interface PEPeerStats

Provides peer statistics. It uses Average to compute its different averages.


Method Summary
 void bytesDiscarded(int num_bytes)
          The given number of bytes received from the peer were discarded.
 void dataBytesReceived(int num_bytes)
          The given number of data (payload) bytes have been received from the peer.
 void dataBytesSent(int num_bytes)
          The given number of data (payload) bytes have been sent to the peer.
 void diskReadComplete(long bytes)
          Disk access stats methods
 int getAggregatedDiskReadCount()
           
 long getDataReceiveRate()
          Get the the average bytes-per-second speed that we are receiving piece data from the peer.
 long getDataSendRate()
          Get the the average bytes-per-second speed that we are sending piece data to the peer.
 int getDownloadRateLimitBytesPerSecond()
           
 long getEstimatedDownloadRateOfPeer()
          Get the estimated total download rate of the peer.
 long getEstimatedSecondsToCompletion()
           
 long getEstimatedUploadRateOfPeer()
          Get the estimated total upload rate of the peer.
 PEPeer getPeer()
           
 int getPermittedBytesToReceive()
           
 int getPermittedBytesToSend()
           
 long getProtocolReceiveRate()
          Get the the average bytes-per-second speed that we are receiving protocol messages from the peer.
 long getProtocolSendRate()
          Get the the average bytes-per-second speed that we are sending protocol messages to the peer.
 long getSmoothDataReceiveRate()
          Get the the longer-average bytes-per-second speed at which the peer is uploading data to us.
 long getTotalBytesDiscarded()
          Get the total number of discarded bytes received from the peer.
 long getTotalBytesDownloadedByPeer()
          Get the number of bytes downloaded in total by this peer (includes data downloaded from all other peers).
 long getTotalDataBytesReceived()
          Get the total number of data (payload) bytes received from the peer.
 long getTotalDataBytesSent()
          Get the total number of data (payload) bytes sent to the peer.
 long getTotalDiskReadBytes()
           
 int getTotalDiskReadCount()
           
 long getTotalProtocolBytesReceived()
          Get the total number of protocol (overhead) bytes received from the peer.
 long getTotalProtocolBytesSent()
          Get the total number of protocol (overhead) bytes sent to the peer.
 int getUploadRateLimitBytesPerSecond()
           
 void hasNewPiece(int piece_size)
          The peer has completed a piece of the given byte size.
 void permittedReceiveBytesUsed(int num)
           
 void permittedSendBytesUsed(int num)
           
 void protocolBytesReceived(int num_bytes)
          The given number of protocol (overhead) bytes have been received from the peer.
 void protocolBytesSent(int num_bytes)
          The given number of protocol (overhead) bytes have been sent to the peer.
 void setDownloadRateLimitBytesPerSecond(int bytes)
           
 void setPeer(PEPeer p)
           
 void setUploadRateLimitBytesPerSecond(int bytes)
           
 void statisticalSentPiece(int piece_size)
          The peer has statistically sent a piecce of the given byte size.
 

Method Detail

getPeer

PEPeer getPeer()

setPeer

void setPeer(PEPeer p)

dataBytesSent

void dataBytesSent(int num_bytes)
The given number of data (payload) bytes have been sent to the peer.

Parameters:
num_bytes -

protocolBytesSent

void protocolBytesSent(int num_bytes)
The given number of protocol (overhead) bytes have been sent to the peer.

Parameters:
num_bytes -

dataBytesReceived

void dataBytesReceived(int num_bytes)
The given number of data (payload) bytes have been received from the peer.

Parameters:
num_bytes -

protocolBytesReceived

void protocolBytesReceived(int 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

int getPermittedBytesToSend()

permittedSendBytesUsed

void permittedSendBytesUsed(int num)

getPermittedBytesToReceive

int getPermittedBytesToReceive()

permittedReceiveBytesUsed

void permittedReceiveBytesUsed(int num)