forked from I2P_Developers/i2p.i2p
stat cleanup
This commit is contained in:
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user