diff --git a/history.txt b/history.txt index 2648c80b2..ea89d5fb7 100644 --- a/history.txt +++ b/history.txt @@ -1,4 +1,8 @@ -$Id: history.txt,v 1.454 2006/04/12 23:22:07 jrandom Exp $ +$Id: history.txt,v 1.455 2006/04/13 07:40:21 jrandom Exp $ + +2006-04-14 jrandom + * Make some more stats graphable, and allow some internal tweaking on the + tunnel pairing for creation and testing. * 2006-04-13 0.6.1.15 released diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 580b74e17..9462a4130 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -15,9 +15,9 @@ import net.i2p.CoreVersion; * */ public class RouterVersion { - public final static String ID = "$Revision: 1.394 $ $Date: 2006/04/12 23:22:33 $"; + public final static String ID = "$Revision: 1.395 $ $Date: 2006/04/13 07:40:22 $"; public final static String VERSION = "0.6.1.15"; - public final static long BUILD = 0; + public final static long BUILD = 1; public static void main(String args[]) { System.out.println("I2P Router version: " + VERSION + "-" + BUILD); System.out.println("Router ID: " + RouterVersion.ID); diff --git a/router/java/src/net/i2p/router/transport/udp/EstablishmentManager.java b/router/java/src/net/i2p/router/transport/udp/EstablishmentManager.java index 2b9fb6ca8..119fb1905 100644 --- a/router/java/src/net/i2p/router/transport/udp/EstablishmentManager.java +++ b/router/java/src/net/i2p/router/transport/udp/EstablishmentManager.java @@ -62,10 +62,10 @@ public class EstablishmentManager { _queuedOutbound = new HashMap(32); _liveIntroductions = new HashMap(32); _activityLock = new Object(); - _context.statManager().createRateStat("udp.inboundEstablishTime", "How long it takes for a new inbound session to be established", "udp", new long[] { 60*60*1000, 24*60*60*1000 }); - _context.statManager().createRateStat("udp.outboundEstablishTime", "How long it takes for a new outbound session to be established", "udp", new long[] { 60*60*1000, 24*60*60*1000 }); - _context.statManager().createRateStat("udp.inboundEstablishFailedState", "What state a failed inbound establishment request fails in", "udp", new long[] { 60*60*1000, 24*60*60*1000 }); - _context.statManager().createRateStat("udp.outboundEstablishFailedState", "What state a failed outbound establishment request fails in", "udp", new long[] { 60*60*1000, 24*60*60*1000 }); + _context.statManager().createRateStat("udp.inboundEstablishTime", "How long it takes for a new inbound session to be established", "udp", new long[] { 60*1000, 60*60*1000, 24*60*60*1000 }); + _context.statManager().createRateStat("udp.outboundEstablishTime", "How long it takes for a new outbound session to be established", "udp", new long[] { 60*1000, 60*60*1000, 24*60*60*1000 }); + _context.statManager().createRateStat("udp.inboundEstablishFailedState", "What state a failed inbound establishment request fails in", "udp", new long[] { 60*1000, 60*60*1000, 24*60*60*1000 }); + _context.statManager().createRateStat("udp.outboundEstablishFailedState", "What state a failed outbound establishment request fails in", "udp", new long[] { 60*1000, 60*60*1000, 24*60*60*1000 }); _context.statManager().createRateStat("udp.sendIntroRelayRequest", "How often we send a relay request to reach a peer", "udp", new long[] { 60*60*1000, 24*60*60*1000 }); _context.statManager().createRateStat("udp.sendIntroRelayTimeout", "How often a relay request times out before getting a response (due to the target or intro peer being offline)", "udp", new long[] { 60*60*1000, 24*60*60*1000 }); _context.statManager().createRateStat("udp.receiveIntroRelayResponse", "How long it took to receive a relay response", "udp", new long[] { 60*60*1000, 24*60*60*1000 }); diff --git a/router/java/src/net/i2p/router/transport/udp/UDPTransport.java b/router/java/src/net/i2p/router/transport/udp/UDPTransport.java index 5e9d6fee3..70814e2ba 100644 --- a/router/java/src/net/i2p/router/transport/udp/UDPTransport.java +++ b/router/java/src/net/i2p/router/transport/udp/UDPTransport.java @@ -154,7 +154,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority _context.statManager().createRateStat("udp.alreadyConnected", "What is the lifetime of a reestablished session", "udp", new long[] { 60*1000, 10*60*1000, 60*60*1000, 24*60*60*1000 }); _context.statManager().createRateStat("udp.droppedPeer", "How long ago did we receive from a dropped peer (duration == session lifetime", "udp", new long[] { 60*60*1000, 24*60*60*1000 }); - _context.statManager().createRateStat("udp.droppedPeerInactive", "How long ago did we receive from a dropped peer (duration == session lifetime)", "udp", new long[] { 60*60*1000, 24*60*60*1000 }); + _context.statManager().createRateStat("udp.droppedPeerInactive", "How long ago did we receive from a dropped peer (duration == session lifetime)", "udp", new long[] { 60*1000, 60*60*1000, 24*60*60*1000 }); _context.statManager().createRateStat("udp.statusOK", "How many times the peer test returned OK", "udp", new long[] { 5*60*1000, 20*60*1000, 60*60*1000, 24*60*60*1000 }); _context.statManager().createRateStat("udp.statusDifferent", "How many times the peer test returned different IP/ports", "udp", new long[] { 5*60*1000, 20*60*1000, 60*60*1000, 24*60*60*1000 }); _context.statManager().createRateStat("udp.statusReject", "How many times the peer test returned reject unsolicited", "udp", new long[] { 5*60*1000, 20*60*1000, 60*60*1000, 24*60*60*1000 }); diff --git a/router/java/src/net/i2p/router/tunnel/pool/BuildRequestor.java b/router/java/src/net/i2p/router/tunnel/pool/BuildRequestor.java index e392a382d..e45449ee9 100644 --- a/router/java/src/net/i2p/router/tunnel/pool/BuildRequestor.java +++ b/router/java/src/net/i2p/router/tunnel/pool/BuildRequestor.java @@ -21,10 +21,17 @@ class BuildRequestor { for (int i = 0; i < BuildMessageGenerator.ORDER.length; i++) ORDER.add(new Integer(i)); } - private static final boolean USE_PAIRED_CLIENT_TUNNELS = true; private static final int PRIORITY = 500; static final int REQUEST_TIMEOUT = 20*1000; + private static boolean usePairedTunnels(RouterContext ctx) { + String val = ctx.getProperty("router.usePairedTunnels"); + if ( (val == null) || (Boolean.valueOf(val).booleanValue()) ) + return true; + else + return false; + } + /** new style requests need to fill in the tunnel IDs before hand */ public static void prepare(RouterContext ctx, PooledTunnelCreatorConfig cfg) { for (int i = 0; i < cfg.getLength(); i++) { @@ -58,7 +65,7 @@ class BuildRequestor { cfg.setTunnelPool(pool); TunnelInfo pairedTunnel = null; - if (pool.getSettings().isExploratory() || !USE_PAIRED_CLIENT_TUNNELS) { + if (pool.getSettings().isExploratory() || !usePairedTunnels(ctx)) { if (pool.getSettings().isInbound()) pairedTunnel = ctx.tunnelManager().selectOutboundTunnel(); else @@ -72,7 +79,7 @@ class BuildRequestor { if (pairedTunnel == null) { if (log.shouldLog(Log.WARN)) log.warn("Couldn't find a paired tunnel for " + cfg + ", fall back on exploratory tunnels for pairing"); - if (!pool.getSettings().isExploratory() && USE_PAIRED_CLIENT_TUNNELS) + if (!pool.getSettings().isExploratory() && usePairedTunnels(ctx)) if (pool.getSettings().isInbound()) pairedTunnel = ctx.tunnelManager().selectOutboundTunnel(); else