From 3836742e7df753b01651f399d2c8dc38421013c8 Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Sat, 17 Nov 2012 17:24:44 +0000 Subject: [PATCH] stat cleanup --- .../net/i2p/router/transport/CommSystemFacadeImpl.java | 7 ++++--- router/java/src/net/i2p/router/transport/GetBidsJob.java | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java b/router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java index 68a237f52d..7338592b4e 100644 --- a/router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java +++ b/router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java @@ -48,7 +48,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade { public CommSystemFacadeImpl(RouterContext context) { _context = context; _log = _context.logManager().getLog(CommSystemFacadeImpl.class); - _context.statManager().createRateStat("transport.getBidsJobTime", "How long does it take?", "Transport", new long[] { 10*60*1000l }); + //_context.statManager().createRateStat("transport.getBidsJobTime", "How long does it take?", "Transport", new long[] { 10*60*1000l }); _netMonitorStatus = true; _geoIP = new GeoIP(_context); startGeoIP(); @@ -142,9 +142,10 @@ public class CommSystemFacadeImpl extends CommSystemFacade { public void processMessage(OutNetMessage msg) { //GetBidsJob j = new GetBidsJob(_context, this, msg); //j.runJob(); - long before = _context.clock().now(); + //long before = _context.clock().now(); GetBidsJob.getBids(_context, this, msg); - _context.statManager().addRateData("transport.getBidsJobTime", _context.clock().now() - before, 0); + // < 0.4 ms + //_context.statManager().addRateData("transport.getBidsJobTime", _context.clock().now() - before); } @Override diff --git a/router/java/src/net/i2p/router/transport/GetBidsJob.java b/router/java/src/net/i2p/router/transport/GetBidsJob.java index 4215d8f0d1..85da18c13f 100644 --- a/router/java/src/net/i2p/router/transport/GetBidsJob.java +++ b/router/java/src/net/i2p/router/transport/GetBidsJob.java @@ -47,7 +47,7 @@ class GetBidsJob extends JobImpl { if (log.shouldLog(Log.WARN)) log.warn("Attempt to send a message to a banlisted peer - " + to); //context.messageRegistry().peerFailed(to); - context.statManager().addRateData("transport.bidFailBanlisted", msg.getLifetime(), 0); + context.statManager().addRateData("transport.bidFailBanlisted", msg.getLifetime()); fail(context, msg); return; } @@ -56,7 +56,7 @@ class GetBidsJob extends JobImpl { if (to.equals(us)) { if (log.shouldLog(Log.ERROR)) log.error("wtf, send a message to ourselves? nuh uh. msg = " + msg); - context.statManager().addRateData("transport.bidFailSelf", msg.getLifetime(), 0); + context.statManager().addRateData("transport.bidFailSelf", msg.getLifetime()); fail(context, msg); return; } @@ -65,11 +65,11 @@ class GetBidsJob extends JobImpl { if (bid == null) { int failedCount = msg.getFailedTransports().size(); if (failedCount == 0) { - context.statManager().addRateData("transport.bidFailNoTransports", msg.getLifetime(), 0); + context.statManager().addRateData("transport.bidFailNoTransports", msg.getLifetime()); // This used to be "no common transports" but it is almost always no transports at all context.banlist().banlistRouter(to, _x("No transports (hidden or starting up?)")); } else if (failedCount >= facade.getTransportCount()) { - context.statManager().addRateData("transport.bidFailAllTransports", msg.getLifetime(), 0); + context.statManager().addRateData("transport.bidFailAllTransports", msg.getLifetime()); // fail after all transports were unsuccessful context.netDb().fail(to); } -- GitLab