mirror of
https://github.com/ChronosX88/KademliaDHT.git
synced 2024-12-23 00:01:46 +00:00
Statistician
- Return data sent in KiloBytes instead of bytes
This commit is contained in:
parent
3705107ce6
commit
72048ad8a1
@ -19,7 +19,7 @@ public interface KadStatistician
|
||||
public void sentData(long size);
|
||||
|
||||
/**
|
||||
* @return The total data sent
|
||||
* @return The total data sent in KiloBytes
|
||||
*/
|
||||
public long getTotalDataSent();
|
||||
|
||||
@ -31,7 +31,7 @@ public interface KadStatistician
|
||||
public void receivedData(long size);
|
||||
|
||||
/**
|
||||
* @return The total data received
|
||||
* @return The total data received in KiloBytes
|
||||
*/
|
||||
public long getTotalDataReceived();
|
||||
|
||||
|
@ -120,7 +120,7 @@ public class KademliaNode
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
System.err.println("Refresh Operation Failed; Message: " + e.getMessage());
|
||||
System.err.println("KademliaNode: Refresh Operation Failed; Message: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -45,7 +45,7 @@ public class Statistician implements KadStatistician
|
||||
@Override
|
||||
public long getTotalDataSent()
|
||||
{
|
||||
return this.totalDataSent;
|
||||
return this.totalDataSent / 1000L;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -58,7 +58,7 @@ public class Statistician implements KadStatistician
|
||||
@Override
|
||||
public long getTotalDataReceived()
|
||||
{
|
||||
return this.totalDataReceived;
|
||||
return this.totalDataReceived / 1000L;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user