* 2005-10-07 0.6.1.2 released
2005-10-07 jrandom * Include the 1 second bandwidth usage on the console rather than the 1 minute rate, as the 1 second value doesn't have the 1m/5m quantization issues.
This commit is contained in:
@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
|
||||
*
|
||||
*/
|
||||
public class RouterVersion {
|
||||
public final static String ID = "$Revision: 1.258 $ $Date: 2005/10/05 18:24:33 $";
|
||||
public final static String VERSION = "0.6.1.1";
|
||||
public final static long BUILD = 5;
|
||||
public final static String ID = "$Revision: 1.259 $ $Date: 2005/10/07 05:23:01 $";
|
||||
public final static String VERSION = "0.6.1.2";
|
||||
public final static long BUILD = 0;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
|
||||
System.out.println("Router ID: " + RouterVersion.ID);
|
||||
|
@ -97,6 +97,8 @@ public class FIFOBandwidthLimiter {
|
||||
public void setInboundUnlimited(boolean isUnlimited) { _inboundUnlimited = isUnlimited; }
|
||||
public boolean getOutboundUnlimited() { return _outboundUnlimited; }
|
||||
public void setOutboundUnlimited(boolean isUnlimited) { _outboundUnlimited = isUnlimited; }
|
||||
public float getSendBps() { return _sendBps; }
|
||||
public float getReceiveBps() { return _recvBps; }
|
||||
|
||||
public void reinitialize() {
|
||||
_pendingInboundRequests.clear();
|
||||
@ -262,13 +264,13 @@ public class FIFOBandwidthLimiter {
|
||||
_lastTotalReceived = totR;
|
||||
_lastStatsUpdated = now;
|
||||
if (_sendBps <= 0)
|
||||
_sendBps = ((float)sent*time)/1000f;
|
||||
_sendBps = ((float)sent*1000f)/(float)time;
|
||||
else
|
||||
_sendBps = (0.9f)*_sendBps + (0.1f)*((float)sent*time)/1000f;
|
||||
_sendBps = (0.9f)*_sendBps + (0.1f)*((float)sent*1000f)/(float)time;
|
||||
if (_recvBps <= 0)
|
||||
_recvBps = ((float)recv*time)/1000f;
|
||||
_recvBps = ((float)recv*1000f)/(float)time;
|
||||
else
|
||||
_recvBps = (0.9f)*_recvBps + (0.1f)*((float)recv*time)/1000f;
|
||||
_recvBps = (0.9f)*_recvBps + (0.1f)*((float)recv*1000)/(float)time;
|
||||
if (_log.shouldLog(Log.WARN)) {
|
||||
if (_log.shouldLog(Log.INFO))
|
||||
_log.info("BW: time = " + time + " sent: " + sent + " recv: " + recv);
|
||||
|
Reference in New Issue
Block a user