Changeset b6a5360


Ignore:
Timestamp:
Sep 16, 2012 3:46:36 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
259c28f
Parents:
0b7b947
Message:

log/stat tweaks

Location:
router/java/src/net/i2p/router/transport/ntcp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/transport/ntcp/EventPumper.java

    r0b7b947 rb6a5360  
    7979    /**
    8080     *  Do we use direct buffers for reading? Default false.
     81     *  NOT recommended as we don't keep good track of them so they will leak.
    8182     *  @see java.nio.ByteBuffer
    8283     */
     
    777778                    boolean connected = con.getChannel().connect(saddr);
    778779                    if (connected) {
    779                         _context.statManager().addRateData("ntcp.connectImmediate", 1);
     780                        // Never happens, we use nonblocking
     781                        //_context.statManager().addRateData("ntcp.connectImmediate", 1);
    780782                        key.interestOps(SelectionKey.OP_READ);
    781783                        processConnect(key);
  • router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java

    r0b7b947 rb6a5360  
    9797        _context.statManager().createRateStat("ntcp.connectFailedTimeoutIOE", "", "ntcp", RATES);
    9898        _context.statManager().createRateStat("ntcp.connectFailedUnresolved", "", "ntcp", RATES);
    99         _context.statManager().createRateStat("ntcp.connectImmediate", "", "ntcp", RATES);
     99        //_context.statManager().createRateStat("ntcp.connectImmediate", "", "ntcp", RATES);
    100100        _context.statManager().createRateStat("ntcp.connectSuccessful", "", "ntcp", RATES);
    101101        _context.statManager().createRateStat("ntcp.corruptDecryptedI2NP", "", "ntcp", RATES);
     
    286286        if (established) { // should we check the queue size?  nah, if its valid, use it
    287287            if (_log.shouldLog(Log.DEBUG))
    288                 _log.debug("fast bid when trying to send to " + peer.toBase64() + " as its already established");
     288                _log.debug("fast bid when trying to send to " + peer + " as its already established");
    289289            return _fastBid;
    290290        }
     
    296296            //_context.shitlist().shitlistRouter(toAddress.getIdentity().calculateHash(), "No NTCP address", STYLE);
    297297            if (_log.shouldLog(Log.DEBUG))
    298                 _log.debug("no bid when trying to send to " + peer.toBase64() + " as they don't have an ntcp address");
     298                _log.debug("no bid when trying to send to " + peer + " as they don't have an ntcp address");
    299299            return null;
    300300        }
     
    305305            //_context.shitlist().shitlistRouter(toAddress.getIdentity().calculateHash(), "Invalid NTCP address", STYLE);
    306306            if (_log.shouldLog(Log.DEBUG))
    307                 _log.debug("no bid when trying to send to " + peer.toBase64() + " as they don't have a valid ntcp address");
     307                _log.debug("no bid when trying to send to " + peer + " as they don't have a valid ntcp address");
    308308            return null;
    309309        }
     
    313313                markUnreachable(peer);
    314314                if (_log.shouldLog(Log.DEBUG))
    315                     _log.debug("no bid when trying to send to " + peer.toBase64() + " as they have a private ntcp address");
     315                    _log.debug("no bid when trying to send to " + peer + " as they have a private ntcp address");
    316316                return null;
    317317            }
     
    320320        if (!allowConnection()) {
    321321            if (_log.shouldLog(Log.WARN))
    322                 _log.warn("no bid when trying to send to " + peer.toBase64() + ", max connection limit reached");
     322                _log.warn("no bid when trying to send to " + peer + ", max connection limit reached");
    323323            return _transientFail;
    324324        }
     
    328328
    329329        if (_log.shouldLog(Log.DEBUG))
    330             _log.debug("slow bid when trying to send to " + peer.toBase64());
     330            _log.debug("slow bid when trying to send to " + peer);
    331331        if (haveCapacity()) {
    332332            if (addr.getCost() > NTCPAddress.DEFAULT_COST)
Note: See TracChangeset for help on using the changeset viewer.