Changeset 4ab727a


Ignore:
Timestamp:
Sep 22, 2016 5:13:42 PM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
78b73852
Parents:
32e1c96
Message:

SSU: addRateData() cleanup

Location:
router/java/src/net/i2p/router/transport/udp
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/transport/udp/EstablishmentManager.java

    r32e1c96 r4ab727a  
    411411                _log.warn("Too many pending, rejecting outbound establish to " + to);
    412412            _transport.failed(msg, "Too many pending outbound connections");
    413             _context.statManager().addRateData("udp.establishRejected", deferred, 0);
     413            _context.statManager().addRateData("udp.establishRejected", deferred);
    414414            return;
    415415        }
     
    733733        _transport.setIP(remote.calculateHash(), state.getSentIP());
    734734       
    735         _context.statManager().addRateData("udp.inboundEstablishTime", state.getLifetime(), 0);
     735        _context.statManager().addRateData("udp.inboundEstablishTime", state.getLifetime());
    736736        sendInboundComplete(peer);
    737737        OutNetMessage msg;
     
    833833        _transport.setIP(remote.calculateHash(), state.getSentIP());
    834834       
    835         _context.statManager().addRateData("udp.outboundEstablishTime", state.getLifetime(), 0);
     835        _context.statManager().addRateData("udp.outboundEstablishTime", state.getLifetime());
    836836        DatabaseStoreMessage dbsm = null;
    837837        if (!state.isFirstMessageOurDSM()) {
     
    942942            state.setIntroNonce(nonce);
    943943        }
    944         _context.statManager().addRateData("udp.sendIntroRelayRequest", 1, 0);
     944        _context.statManager().addRateData("udp.sendIntroRelayRequest", 1);
    945945        List<UDPPacket> requests = _builder.buildRelayRequest(_transport, state, _transport.getIntroKey());
    946946        if (requests.isEmpty()) {
     
    990990            return;
    991991        }
    992         _context.statManager().addRateData("udp.receiveIntroRelayResponse", state.getLifetime(), 0);
     992        _context.statManager().addRateData("udp.receiveIntroRelayResponse", state.getLifetime());
    993993        if (_log.shouldLog(Log.INFO))
    994994            _log.info("Received RelayResponse for " + state.getRemoteIdentity().calculateHash() + " - they are on "
     
    12311231
    12321232                  case IB_STATE_COMPLETE:  // fall through
    1233                   case IB_STATE_FAILED:
     1233                  case IB_STATE_FAILED: // leak here if fail() was called in IES???
    12341234                    break; // already removed;
    12351235
     
    13881388                if (_log.shouldLog(Log.DEBUG))
    13891389                    _log.debug("Send intro for " + outboundState + " timed out");
    1390                 _context.statManager().addRateData("udp.sendIntroRelayTimeout", 1, 0);
     1390                _context.statManager().addRateData("udp.sendIntroRelayTimeout", 1);
    13911391            }
    13921392        }
  • router/java/src/net/i2p/router/transport/udp/InboundMessageFragments.java

    r32e1c96 r4ab727a  
    218218            if (ackCount > 0) {
    219219                rv += ackCount;
    220                 _context.statManager().addRateData("udp.receivedACKs", ackCount, 0);
     220                _context.statManager().addRateData("udp.receivedACKs", ackCount);
    221221                //_context.statManager().getStatLog().addData(from.getRemoteHostId().toString(), "udp.peer.receiveACKCount", acks.length, 0);
    222222
  • router/java/src/net/i2p/router/transport/udp/OutboundMessageFragments.java

    r32e1c96 r4ab727a  
    223223                _log.debug("Add a new message to an existing peer " + peer.getRemotePeer());
    224224        }
    225         _context.statManager().addRateData("udp.outboundActivePeers", _activePeers.size(), 0);
     225        _context.statManager().addRateData("udp.outboundActivePeers", _activePeers.size());
    226226
    227227        // Avoid sync if possible
  • router/java/src/net/i2p/router/transport/udp/UDPSender.java

    r32e1c96 r4ab727a  
    313313            while ( (_keepRunning) && (packet == null || packet.getLifetime() > MAX_HEAD_LIFETIME) ) {
    314314                if (packet != null) {
    315                     _context.statManager().addRateData("udp.sendQueueTrimmed", 1, 0);
     315                    _context.statManager().addRateData("udp.sendQueueTrimmed", 1);
    316316                    packet.release();
    317317                }
  • router/java/src/net/i2p/router/transport/udp/UDPTransport.java

    r32e1c96 r4ab727a  
    13251325       
    13261326        if (oldEstablishedOn > 0)
    1327             _context.statManager().addRateData("udp.alreadyConnected", oldEstablishedOn, 0);
     1327            _context.statManager().addRateData("udp.alreadyConnected", oldEstablishedOn);
    13281328       
    13291329        synchronized(_rebuildLock) {
Note: See TracChangeset for help on using the changeset viewer.