Changeset 6515e6e


Ignore:
Timestamp:
Aug 13, 2009 3:21:22 PM (11 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
4b75be8
Parents:
55e8583
Message:

merge strings for efficiency

File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/peermanager/ProfileOrganizerRenderer.java

    r55e8583 r6515e6e  
    6060        buf.append("<h2>Peer Profiles</h2>\n");
    6161        buf.append("<p>Showing ").append(order.size()).append(" recent profiles, hiding ").append(peers.size()-order.size()).append(" older profiles</p>");
    62         buf.append("<table>");
    63         buf.append("<tr>");
    64         buf.append("<th>Peer</th>");
    65         buf.append("<th>Groups (Caps)</th>");
    66         buf.append("<th>Speed</th>");
    67         buf.append("<th>Capacity</th>");
    68         buf.append("<th>Integration</th>");
    69         buf.append("<th>Failing?</th>");
    70         buf.append("<th>&nbsp;</th>");
    71         buf.append("</tr>");
     62        buf.append("<table>" +
     63                   "<tr>" +
     64                   "<th>Peer</th>" +
     65                   "<th>Groups (Caps)</th>" +
     66                   "<th>Speed</th>" +
     67                   "<th>Capacity</th>" +
     68                   "<th>Integration</th>" +
     69                   "<th>Failing?</th>" +
     70                   "<th>&nbsp;</th>" +
     71                   "</tr>");
    7272        int prevTier = 1;
    7373        for (Iterator iter = order.iterator(); iter.hasNext();) {
     
    157157        buf.append("</table>");
    158158
    159         buf.append("<h2>Floodfill and Integrated Peers</h2>\n");
    160         buf.append("<table>");
    161         buf.append("<tr>");
    162         buf.append("<th class=\"smallhead\">Peer</th>");
    163         buf.append("<th class=\"smallhead\">Caps</th>");
    164         buf.append("<th class=\"smallhead\">Integ. Value</th>");
    165         buf.append("<th class=\"smallhead\">Last Heard About</th>");
    166         buf.append("<th class=\"smallhead\">Last Heard From</th>");
    167 //        buf.append("<th class=\"smallhead\">Last Successful Send</th>");
    168         buf.append("<th class=\"smallhead\">Last Good Send</th>");       
    169 //        buf.append("<th class=\"smallhead\">Last Failed Send</th>");
    170         buf.append("<th class=\"smallhead\">Last Bad Send</th>");
    171         buf.append("<th class=\"smallhead\">10m Resp. Time</th>");
    172         buf.append("<th class=\"smallhead\">1h Resp. Time</th>");
    173         buf.append("<th class=\"smallhead\">1d Resp. Time</th>");
    174 //        buf.append("<th class=\"smallhead\">Successful Lookups</th>");
    175         buf.append("<th class=\"smallhead\">Good Lookups</th>");
    176 //        buf.append("<th>Failed Lookups</th>");
    177         buf.append("<th class=\"smallhead\">Bad Lookups</th>");       
    178         buf.append("<th class=\"smallhead\">New Stores</th>");
    179         buf.append("<th class=\"smallhead\">Old Stores</th>");
    180         buf.append("<th class=\"smallhead\">1h Fail Rate</th>");
    181         buf.append("<th class=\"smallhead\">1d Fail Rate</th>");
    182         buf.append("</tr>");
     159        buf.append("<h2>Floodfill and Integrated Peers</h2>\n" +
     160                   "<table>" +
     161                   "<tr>" +
     162                   "<th class=\"smallhead\">Peer</th>" +
     163                   "<th class=\"smallhead\">Caps</th>" +
     164                   "<th class=\"smallhead\">Integ. Value</th>" +
     165                   "<th class=\"smallhead\">Last Heard About</th>" +
     166                   "<th class=\"smallhead\">Last Heard From</th>" +
     167//                   "<th class=\"smallhead\">Last Successful Send</th>" +
     168                   "<th class=\"smallhead\">Last Good Send</th>" +       
     169//                   "<th class=\"smallhead\">Last Failed Send</th>" +
     170                   "<th class=\"smallhead\">Last Bad Send</th>" +
     171                   "<th class=\"smallhead\">10m Resp. Time</th>" +
     172                   "<th class=\"smallhead\">1h Resp. Time</th>" +
     173                   "<th class=\"smallhead\">1d Resp. Time</th>" +
     174//                   "<th class=\"smallhead\">Successful Lookups</th>" +
     175                   "<th class=\"smallhead\">Good Lookups</th>" +
     176//                   "<th>Failed Lookups</th>" +
     177                   "<th class=\"smallhead\">Bad Lookups</th>" +       
     178                   "<th class=\"smallhead\">New Stores</th>" +
     179                   "<th class=\"smallhead\">Old Stores</th>" +
     180                   "<th class=\"smallhead\">1h Fail Rate</th>" +
     181                   "<th class=\"smallhead\">1d Fail Rate</th>" +
     182                   "</tr>");
    183183        for (Iterator iter = integratedPeers.iterator(); iter.hasNext();) {
    184184            PeerProfile prof = (PeerProfile)iter.next();
     
    223223        buf.append("<b>Capacity:</b> ").append(num(_organizer.getCapacityThreshold())).append(" (").append(reliable).append(" high capacity peers)<br />");
    224224        buf.append("<b>Integration:</b> ").append(num(_organizer.getIntegrationThreshold())).append(" (").append(integrated).append(" well integrated peers)");
    225         buf.append("<h3>Definitions:</h3><ul>");
    226         buf.append("<li><b>groups</b>: as determined by the profile organizer</li>");
    227         buf.append("<li><b>caps</b>: capabilities in the netDb, not used to determine profiles</li>");
    228         buf.append("<li><b>speed</b>: peak throughput (bytes per second) over a 1 minute period that the peer has sustained in a single tunnel</li>");
    229         buf.append("<li><b>capacity</b>: how many tunnels can we ask them to join in an hour?</li>");
    230         buf.append("<li><b>integration</b>: how many new peers have they told us about lately?</li>");
    231         buf.append("<li><b>failing?</b>: is the peer currently swamped (and if possible we should avoid nagging them)?</li>");
    232         buf.append("</ul></i>");
     225        buf.append("<h3>Definitions:</h3><ul>" +
     226                   "<li><b>groups</b>: as determined by the profile organizer</li>" +
     227                   "<li><b>caps</b>: capabilities in the netDb, not used to determine profiles</li>" +
     228                   "<li><b>speed</b>: peak throughput (bytes per second) over a 1 minute period that the peer has sustained in a single tunnel</li>" +
     229                   "<li><b>capacity</b>: how many tunnels can we ask them to join in an hour?</li>" +
     230                   "<li><b>integration</b>: how many new peers have they told us about lately?</li>" +
     231                   "<li><b>failing?</b>: is the peer currently swamped (and if possible we should avoid nagging them)?</li>" +
     232                   "</ul></i>");
    233233        out.write(buf.toString());
    234234        out.flush();
Note: See TracChangeset for help on using the changeset viewer.