Minor cleanups, -15
This commit is contained in:
@ -830,7 +830,7 @@ public class DataHelper {
|
||||
}
|
||||
|
||||
public static String formatDuration(long ms) {
|
||||
if (ms < 30 * 1000) {
|
||||
if (ms < 5 * 1000) {
|
||||
return ms + "ms";
|
||||
} else if (ms < 5 * 60 * 1000) {
|
||||
return (ms / 1000) + "s";
|
||||
|
@ -351,6 +351,7 @@ public class EepGet {
|
||||
System.out.println("** Transfered " + bytesTransferred
|
||||
+ " with " + (bytesRemaining < 0 ? "unknown" : ""+bytesRemaining) + " remaining");
|
||||
System.out.println("** " + cause.getMessage());
|
||||
_previousWritten += _written;
|
||||
_written = 0;
|
||||
}
|
||||
public void transferFailed(String url, long bytesTransferred, long bytesRemaining, int currentAttempt) {
|
||||
|
14
history.txt
14
history.txt
@ -1,8 +1,20 @@
|
||||
2008-04-07 zzz
|
||||
* i2psnark:
|
||||
- Implement upstream bandwidth limiting
|
||||
- Fix a rare NPE at startup/shutdown
|
||||
- Really increase retries for .torrent fetch
|
||||
* profiles.jsp: Minor cleanup
|
||||
* DataHelper: Only format < 5s as ms
|
||||
* Eepget: Fix percentage output on command line eepget retries
|
||||
* Lower partipating message priority from 400 to 200
|
||||
* NTCP: Add a debug message
|
||||
* Outbound message: Minor cleanup
|
||||
|
||||
2008-03-30 zzz
|
||||
* ExploratoryPeerSelector: Try NonFailing even more
|
||||
* HostsTxtNamingService: Add reverse lookup support
|
||||
* Outbound message: Minor cleanup
|
||||
* i2psnark TrackerCLient: Minor cleanup
|
||||
* i2psnark TrackerClient: Minor cleanup
|
||||
* checklist.txt: Minor edit
|
||||
* hosts.txt: Add perv.i2p, false.i2p, mtn.i2p2.i2p
|
||||
* i2ptunnel.config: Change CVS client to mtn
|
||||
|
@ -17,7 +17,7 @@ import net.i2p.CoreVersion;
|
||||
public class RouterVersion {
|
||||
public final static String ID = "$Revision: 1.548 $ $Date: 2008-02-10 15:00:00 $";
|
||||
public final static String VERSION = "0.6.1.32";
|
||||
public final static long BUILD = 14;
|
||||
public final static long BUILD = 15;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
|
||||
System.out.println("Router ID: " + RouterVersion.ID);
|
||||
|
@ -257,15 +257,15 @@ public class OutboundClientMessageOneShotJob extends JobImpl {
|
||||
}
|
||||
_lease = (Lease) _leaseCache.get(_to);
|
||||
if (_lease != null) {
|
||||
if (!_lease.isExpired()) {
|
||||
// if outbound tunnel length == 0 && lease.firsthop.isBacklogged() don't use it ??
|
||||
if (!_lease.isExpired(Router.CLOCK_FUDGE_FACTOR)) {
|
||||
if (_log.shouldLog(Log.INFO))
|
||||
_log.info("Found in cache - lease for " + _toString);
|
||||
return true;
|
||||
} else {
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn("Expired from cache - lease for " + _toString);
|
||||
_leaseCache.remove(_to);
|
||||
}
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn("Expired from cache - lease for " + _toString);
|
||||
_leaseCache.remove(_to);
|
||||
}
|
||||
}
|
||||
|
||||
@ -484,7 +484,7 @@ public class OutboundClientMessageOneShotJob extends JobImpl {
|
||||
for (Iterator iter = tc.keySet().iterator(); iter.hasNext(); ) {
|
||||
Destination dest = (Destination) iter.next();
|
||||
Lease l = (Lease) tc.get(dest);
|
||||
if (l.isExpired())
|
||||
if (l.isExpired(Router.CLOCK_FUDGE_FACTOR))
|
||||
deleteList.add(dest);
|
||||
}
|
||||
for (Iterator iter = deleteList.iterator(); iter.hasNext(); ) {
|
||||
@ -599,8 +599,8 @@ public class OutboundClientMessageOneShotJob extends JobImpl {
|
||||
|
||||
long sendTime = getContext().clock().now() - _start;
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn(getJobId() + ": Failed to send the message " + _clientMessageId + " after "
|
||||
+ sendTime + "ms");
|
||||
_log.warn(getJobId() + ": Failed to send the message " + _clientMessageId + " to " + _toString +
|
||||
" after " + sendTime + "ms");
|
||||
|
||||
long messageDelay = getContext().throttle().getMessageDelay();
|
||||
long tunnelLag = getContext().throttle().getTunnelLag();
|
||||
|
@ -286,13 +286,13 @@ class ProfileOrganizerRenderer {
|
||||
String avg (PeerProfile prof, long rate) {
|
||||
RateStat rs = prof.getDbResponseTime();
|
||||
if (rs == null)
|
||||
return num(0d);
|
||||
return "0ms";
|
||||
Rate r = rs.getRate(rate);
|
||||
if (r == null)
|
||||
return num(0d);
|
||||
return "0ms";
|
||||
long c = r.getCurrentEventCount() + r.getLastEventCount();
|
||||
if (c == 0)
|
||||
return num(0d);
|
||||
return "0ms";
|
||||
double d = r.getCurrentTotalValue() + r.getLastTotalValue();
|
||||
return Math.round(d/c) + "ms";
|
||||
}
|
||||
|
@ -599,6 +599,8 @@ public class NTCPConnection implements FIFOBandwidthLimiter.CompleteListener {
|
||||
return;
|
||||
// if (_outbound.indexOf(msg) > 0)
|
||||
// _log.debug("Priority message sent, pri = " + msg.getPriority() + " pos = " + _outbound.indexOf(msg) + "/" +_outbound.size());
|
||||
if (_log.shouldLog(Log.INFO))
|
||||
_log.info("Type " + msg.getMessage().getType() + " pri " + msg.getPriority() + " slot " + _outbound.indexOf(msg));
|
||||
_outbound.remove(msg);
|
||||
}
|
||||
_currentOutbound = msg;
|
||||
|
Reference in New Issue
Block a user