Methods Summary |
---|
public void | add(com.aelitis.azureus.core.dht.transport.util.DHTTransportStatsImpl other)
add( pings, other.pings );
add( find_nodes, other.find_nodes );
add( find_values, other.find_values );
add( stores, other.stores );
add( stats, other.stats );
add( data, other.data );
add( key_blocks, other.key_blocks );
add( aliens, other.aliens );
incoming_requests += other.incoming_requests;
outgoing_requests += other.outgoing_requests;
|
protected void | add(long[] a, long[] b)
for (int i=0;i<a.length;i++){
a[i] += b[i];
}
|
public void | dataOK()
data[STAT_OK]++;
|
public void | dataReceived()
data[STAT_RECEIVED]++;
|
public void | dataSent(com.aelitis.azureus.core.dht.transport.udp.impl.DHTUDPPacketRequest request)
data[STAT_SENT]++;
outgoingRequestSent( request );
|
public void | dayaFailed()
data[STAT_FAILED]++;
|
public void | findNodeFailed()
find_nodes[STAT_FAILED]++;
|
public void | findNodeOK()
find_nodes[STAT_OK]++;
|
public void | findNodeReceived()
find_nodes[STAT_RECEIVED]++;
|
public void | findNodeSent(com.aelitis.azureus.core.dht.transport.udp.impl.DHTUDPPacketRequest request)
find_nodes[STAT_SENT]++;
outgoingRequestSent( request );
|
public void | findValueFailed()
find_values[STAT_FAILED]++;
|
public void | findValueOK()
find_values[STAT_OK]++;
|
public void | findValueReceived()
find_values[STAT_RECEIVED]++;
|
public void | findValueSent(com.aelitis.azureus.core.dht.transport.udp.impl.DHTUDPPacketRequest request)
find_values[STAT_SENT]++;
outgoingRequestSent( request );
|
public long[] | getAliens()
return( aliens );
|
public long[] | getData()
return( data );
|
public long[] | getFindNodes()
return( find_nodes );
|
public long[] | getFindValues()
return( find_values );
|
public long | getIncomingRequests()
return( incoming_requests );
|
public long[] | getKeyBlocks()
return( key_blocks );
|
public long[] | getPings()
return( pings );
|
protected byte | getProtocolVersion()
return( protocol_version );
|
public long[] | getStores()
return( stores );
|
public java.lang.String | getString()
return( "ping:" + getString( pings ) + "," +
"store:" + getString( stores ) + "," +
"node:" + getString( find_nodes ) + "," +
"value:" + getString( find_values ) + "," +
"stats:" + getString( stats ) + "," +
"data:" + getString( data ) + "," +
"kb:" + getString( key_blocks ) + "," +
"incoming:" + incoming_requests +"," +
"alien:" + getString( aliens ));
|
protected java.lang.String | getString(long[] x)
String str = "";
for (int i=0;i<x.length;i++){
str += (i==0?"":",") + x[i];
}
return( str );
|
public void | incomingRequestReceived(com.aelitis.azureus.core.dht.transport.udp.impl.DHTUDPPacketRequest request, boolean alien)
incoming_requests++;
if ( alien ){
int type = request.getAction();
if ( type == DHTUDPPacketHelper.ACT_REQUEST_FIND_NODE ){
aliens[AT_FIND_NODE]++;
}else if ( type == DHTUDPPacketHelper.ACT_REQUEST_FIND_VALUE ){
aliens[AT_FIND_VALUE]++;
}else if ( type == DHTUDPPacketHelper.ACT_REQUEST_PING ){
aliens[AT_PING]++;
}else if ( type == DHTUDPPacketHelper.ACT_REQUEST_STATS ){
aliens[AT_STATS]++;
}else if ( type == DHTUDPPacketHelper.ACT_REQUEST_STORE ){
aliens[AT_STORE]++;
}else if ( type == DHTUDPPacketHelper.ACT_REQUEST_KEY_BLOCK ){
aliens[AT_KEY_BLOCK]++;
}
}
if ( DHTLog.TRACE_VERSIONS ){
byte protocol_version = request.getProtocolVersion();
if ( protocol_version >= 0 && protocol_version < incoming_request_versions.length ){
incoming_request_versions[ protocol_version ]++;
incoming_version_requests++;
if ( incoming_version_requests%100 == 0 ){
String str= "";
for (int i=0;i<incoming_request_versions.length;i++){
long count = incoming_request_versions[i];
if ( count > 0 ){
str += (str.length()==0?"":", ") + i + "=" + count + "[" +
((incoming_request_versions[i]*100)/incoming_version_requests) + "]";
}
}
System.out.println( "net " + request.getTransport().getNetwork() + ": Incoming versions: tot = " + incoming_requests +"/" + incoming_version_requests + ": " + str );
}
if ( incoming_version_requests%1000 == 0 ){
for (int i=0;i<incoming_request_versions.length;i++){
incoming_request_versions[i] = 0;
}
incoming_version_requests = 0;
}
}
}
|
public void | keyBlockFailed()
key_blocks[STAT_FAILED]++;
|
public void | keyBlockOK()
key_blocks[STAT_OK]++;
|
public void | keyBlockReceived()
key_blocks[STAT_RECEIVED]++;
|
public void | keyBlockSent(com.aelitis.azureus.core.dht.transport.udp.impl.DHTUDPPacketRequest request)
key_blocks[STAT_SENT]++;
outgoingRequestSent( request );
|
protected void | outgoingRequestSent(com.aelitis.azureus.core.dht.transport.udp.impl.DHTUDPPacketRequest request)
outgoing_requests++;
if ( DHTLog.TRACE_VERSIONS ){
byte protocol_version = request.getProtocolVersion();
if ( protocol_version >= 0 && protocol_version < outgoing_request_versions.length ){
outgoing_request_versions[ protocol_version ]++;
outgoing_version_requests++;
if ( outgoing_version_requests%100 == 0 ){
String str= "";
for (int i=0;i<outgoing_request_versions.length;i++){
long count = outgoing_request_versions[i];
if ( count > 0 ){
str += (str.length()==0?"":", ") + i + "=" + count + "[" +
((outgoing_request_versions[i]*100)/outgoing_version_requests) + "]";
}
}
System.out.println( "net " + request.getTransport().getNetwork() + ": Outgoing versions: tot = " + outgoing_requests +"/" + outgoing_version_requests + ": " + str );
}
if ( outgoing_version_requests%1000 == 0 ){
for (int i=0;i<outgoing_request_versions.length;i++){
outgoing_request_versions[i] = 0;
}
outgoing_version_requests = 0;
}
}
}
|
public void | pingFailed()
pings[STAT_FAILED]++;
|
public void | pingOK()
pings[STAT_OK]++;
|
public void | pingReceived()
pings[STAT_RECEIVED]++;
|
public void | pingSent(com.aelitis.azureus.core.dht.transport.udp.impl.DHTUDPPacketRequest request)
pings[STAT_SENT]++;
outgoingRequestSent( request );
|
protected void | snapshotSupport(com.aelitis.azureus.core.dht.transport.util.DHTTransportStatsImpl clone)
clone.pings = (long[])pings.clone();
clone.find_nodes = (long[])find_nodes.clone();
clone.find_values = (long[])find_values.clone();
clone.stores = (long[])stores.clone();
clone.data = (long[])data.clone();
clone.key_blocks = (long[])key_blocks.clone();
clone.aliens = (long[])aliens.clone();
clone.incoming_requests = incoming_requests;
clone.outgoing_requests = outgoing_requests;
|
public void | statsFailed()
stats[STAT_FAILED]++;
|
public void | statsOK()
stats[STAT_OK]++;
|
public void | statsReceived()
stats[STAT_RECEIVED]++;
|
public void | statsSent(com.aelitis.azureus.core.dht.transport.udp.impl.DHTUDPPacketRequest request)
stats[STAT_SENT]++;
outgoingRequestSent( request );
|
public void | storeFailed()
stores[STAT_FAILED]++;
|
public void | storeOK()
stores[STAT_OK]++;
|
public void | storeReceived()
stores[STAT_RECEIVED]++;
|
public void | storeSent(com.aelitis.azureus.core.dht.transport.udp.impl.DHTUDPPacketRequest request)
stores[STAT_SENT]++;
outgoingRequestSent( request );
|