2006-05-17 Complication

* Fix some oversights in my previous changes:
      adjust some loglevels, make a few statements less wasteful,
      make one comparison less confusing and more likely to log unexpected values
This commit is contained in:
complication
2006-05-18 03:42:55 +00:00
committed by zzz
parent a0f865fb99
commit de1ca4aea4
4 changed files with 15 additions and 10 deletions

View File

@ -1,4 +1,9 @@
$Id: history.txt,v 1.476 2006-05-16 13:34:28 jrandom Exp $
$Id: history.txt,v 1.477 2006-05-17 22:01:21 jrandom Exp $
2006-05-17 Complication
* Fix some oversights in my previous changes:
adjust some loglevels, make a few statements less wasteful,
make one comparison less confusing and more likely to log unexpected values
2006-05-17 jrandom
* Make the peer page sortable

View File

@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
*
*/
public class RouterVersion {
public final static String ID = "$Revision: 1.416 $ $Date: 2006-05-16 13:34:08 $";
public final static String ID = "$Revision: 1.417 $ $Date: 2006-05-17 22:00:49 $";
public final static String VERSION = "0.6.1.18";
public final static long BUILD = 5;
public final static long BUILD = 6;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
System.out.println("Router ID: " + RouterVersion.ID);

View File

@ -552,7 +552,7 @@ public class TunnelDispatcher implements Service {
long periodWithoutDrop = _context.clock().now() - _lastDropTime;
if (periodWithoutDrop < DROP_BASE_INTERVAL) {
if (_log.shouldLog(Log.WARN))
_log.error("Not dropping tunnel, since last drop was " + periodWithoutDrop + " ms ago!");
_log.warn("Not dropping tunnel, since last drop was " + periodWithoutDrop + " ms ago!");
return;
}
@ -576,9 +576,9 @@ public class TunnelDispatcher implements Service {
if ((currentMessages > 20) && ((biggest == null) || (currentRate > biggestRate))) {
// Update our profile of the biggest
biggest = current;
biggestMessages = biggest.getProcessedMessagesCount();
biggestAge = (_context.clock().now() - current.getCreation());
biggestRate = ((double) biggestMessages / (biggestAge / 1000));
biggestMessages = currentMessages;
biggestAge = currentAge;
biggestRate = currentRate;
}
}
@ -588,8 +588,8 @@ public class TunnelDispatcher implements Service {
return;
}
if (_log.shouldLog(Log.ERROR))
_log.error("Dropping tunnel with " + biggestRate + " messages/s and " + biggestMessages +
if (_log.shouldLog(Log.WARN))
_log.warn("Dropping tunnel with " + biggestRate + " messages/s and " + biggestMessages +
" messages, last drop was " + (periodWithoutDrop / 1000) + " s ago.");
remove(biggest);
_lastDropTime = _context.clock().now() + _context.random().nextInt(DROP_RANDOM_BOOST);

View File

@ -166,7 +166,7 @@ class BuildExecutor implements Runnable {
return(0);
} else {
// Mild overload, check if we already build tunnels
if (concurrent <= 0) {
if (concurrent == 0) {
// We aren't building, allow 1
if (_log.shouldLog(Log.WARN))
_log.warn("Mild overload, allow building 1.");