Changeset c75ff53


Ignore:
Timestamp:
May 23, 2009 8:23:28 PM (11 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
f4fdbce
Parents:
7e71ead
Message:

a little peers.jsp cleanup

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

Legend:

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

    r7e71ead rc75ff53  
    628628        long recvTotal = 0;
    629629        int numPeers = 0;
    630         int readingPeers = 0;
    631         int writingPeers = 0;
    632630        float bpsSend = 0;
    633631        float bpsRecv = 0;
     
    637635
    638636        StringBuffer buf = new StringBuffer(512);
    639         buf.append("<b id=\"ntcpcon\">NTCP connections: ").append(peers.size());
     637        buf.append("<p><b id=\"ntcpcon\">NTCP connections: ").append(peers.size());
    640638        buf.append(" limit: ").append(getMaxConnections());
    641639        buf.append(" timeout: ").append(DataHelper.formatDuration(_pumper.getIdleTimeout()));
     
    701699                if (outQueue > 1)
    702700                    buf.append("s");
    703                 writingPeers++;
    704701            }
    705702            buf.append("</code></td><td align=\"center\"><code>").append(con.getConsecutiveBacklog() > 0 ? "true" : "false");
     
    709706            } else {
    710707                buf.append("</code></td><td><code>For ").append(DataHelper.formatDuration(readTime));
    711                 readingPeers++;
    712708            }
    713709            buf.append("</code></td></tr>\n");
     
    727723        }
    728724
    729         buf.append("</table>\n");
    730         buf.append("Peers currently reading I2NP messages: ").append(readingPeers).append("<br />\n");
    731         buf.append("Peers currently writing I2NP messages: ").append(writingPeers).append("<br />\n");
     725        buf.append("</table></p>\n");
    732726        out.write(buf.toString());
    733727        buf.setLength(0);
  • router/java/src/net/i2p/router/transport/udp/UDPTransport.java

    r7e71ead rc75ff53  
    17481748       
    17491749        StringBuffer buf = new StringBuffer(512);
    1750         buf.append("<b id=\"udpcon\">UDP connections: ").append(peers.size());
     1750        buf.append("<p><b id=\"udpcon\">UDP connections: ").append(peers.size());
    17511751        buf.append(" limit: ").append(getMaxConnections());
    17521752        buf.append(" timeout: ").append(DataHelper.formatDuration(_expireTimeout));
     
    19851985        buf.append("     <td align=\"right\">").append(resentTotal);
    19861986        buf.append("</td><td align=\"right\">").append(dupRecvTotal).append("</td>\n");
    1987         buf.append(" </tr>\n");
    1988         buf.append("<tr><td colspan=\"15\" valign=\"top\" align=\"left\">");
     1987        buf.append(" </tr></table></p><p>\n");
    19891988        long bytesTransmitted = _context.bandwidthLimiter().getTotalAllocatedOutboundBytes();
    19901989        // NPE here early
     
    19951994        double bwResent = (nondupSent <= 0 ? 0d : ((((double)resentTotal)*averagePacketSize) / nondupSent));
    19961995        buf.append("Percentage of bytes retransmitted (lifetime): ").append(formatPct(bwResent));
    1997         buf.append(" <i>(includes retransmission required by packet loss)</i><br />\n");
    1998         buf.append("</td></tr>\n");
     1996        buf.append(" <i>(includes retransmission required by packet loss)</i><br /></p>\n");
    19991997        out.write(buf.toString());
    20001998        buf.setLength(0);
    20011999        out.write(KEY);
    2002         out.write("</table>\n");
    20032000    }
    20042001   
     
    20162013    }
    20172014   
    2018     private static final String KEY = "<tr><td colspan=\"15\" valign=\"top\" align=\"left\">" +
    2019         "<b id=\"def.peer\">peer</b>: the remote peer (&lt; inbound, &gt; outbound, v means they offer to introduce us, ^ means we offer to introduce them)<br />\n" +
     2015    private static final String KEY = "<p>" +
     2016        "<b id=\"def.peer\">peer</b>: the remote peer<br />\n" +
     2017        "<b id=\"def.dir\">dir</b>: v means they offer to introduce us, ^ means we offer to introduce them<br />\n" +
    20202018        "<b id=\"def.idle\">idle</b>: the idle time is how long since a packet has been received or sent<br />\n" +
    20212019        "<b id=\"def.rate\">in/out</b>: the rates show a smoothed inbound and outbound transfer rate (KBytes per second)<br />\n" +
     
    20352033        "<b id=\"def.resent\">resent</b>: the number of packets retransmitted to the peer<br />\n" +
    20362034        "<b id=\"def.dupRecv\">dupRecv</b>: the number of duplicate packets received from the peer" +
    2037         "</td></tr>\n";
     2035        "</p>\n";
    20382036   
    20392037    /**
Note: See TracChangeset for help on using the changeset viewer.