Changeset 6f75680


Ignore:
Timestamp:
Feb 5, 2019 2:57:10 PM (18 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
beb0879
Parents:
a756c12
Message:

SSU: PacketHandler? cleanup (ticket #2383)

File:
1 edited

Legend:

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

    ra756c12 r6f75680  
    7878        }
    7979
    80         _context.statManager().createRateStat("udp.handleTime", "How long it takes to handle a received packet after its been pulled off the queue", "udp", UDPTransport.RATES);
    81         _context.statManager().createRateStat("udp.queueTime", "How long after a packet is received can we begin handling it", "udp", UDPTransport.RATES);
     80        //_context.statManager().createRateStat("udp.handleTime", "How long it takes to handle a received packet after its been pulled off the queue", "udp", UDPTransport.RATES);
     81        //_context.statManager().createRateStat("udp.queueTime", "How long after a packet is received can we begin handling it", "udp", UDPTransport.RATES);
    8282        _context.statManager().createRateStat("udp.receivePacketSkew", "How long ago after the packet was sent did we receive it", "udp", UDPTransport.RATES);
    8383        _context.statManager().createRateStat("udp.droppedInvalidUnkown", "How old the packet we dropped due to invalidity (unkown type) was", "udp", UDPTransport.RATES);
     
    207207
    208208                packet.received();
    209                 if (_log.shouldLog(Log.DEBUG))
    210                     _log.debug("Received: " + packet);
     209                //if (_log.shouldLog(Log.DEBUG))
     210                //    _log.debug("Received: " + packet);
    211211                _state = 4;
    212                 long queueTime = packet.getLifetime();
    213                 long handleStart = _context.clock().now();
     212                //long queueTime = packet.getLifetime();
     213                //long handleStart = _context.clock().now();
    214214                try {
    215215                    _state = 5;
     
    221221                        _log.error("Crazy error handling a packet: " + packet, e);
    222222                }
    223                 long handleTime = _context.clock().now() - handleStart;
     223                //long handleTime = _context.clock().now() - handleStart;
    224224                //packet.afterHandling();
    225                 _context.statManager().addRateData("udp.handleTime", handleTime, packet.getLifetime());
    226                 _context.statManager().addRateData("udp.queueTime", queueTime, packet.getLifetime());
     225                //_context.statManager().addRateData("udp.handleTime", handleTime, packet.getLifetime());
     226                //_context.statManager().addRateData("udp.queueTime", queueTime, packet.getLifetime());
    227227                _state = 8;
    228228
     
    418418                        for (PeerState ps : peers) {
    419419                            boolean valid = false;
    420                             long now = _context.clock().now();
    421                             if (_log.shouldLog(Log.WARN))
     420                            if (_log.shouldLog(Log.WARN)) {
     421                                long now = _context.clock().now();
    422422                                buf.append(ps.getRemoteHostId().toString())
    423423                                   .append(" last sent: ").append(now - ps.getLastSendTime())
    424424                                   .append(" last rcvd: ").append(now - ps.getLastReceiveTime());
     425                            }
    425426                            if (ps.getRemotePort() == newPort) {
    426427                                foundSamePort = true;
Note: See TracChangeset for help on using the changeset viewer.