Changeset 5c6d757


Ignore:
Timestamp:
Aug 13, 2009 6:25:45 PM (11 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
5decf3cd
Parents:
4b75be8
Message:

add size total

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java

    r4b75be8 r5c6d757  
    6565        resp.setCharacterEncoding("UTF-8");
    6666        resp.setContentType("text/html; charset=UTF-8");
    67         long stats[] = {0,0,0,0,0};
     67        /** dl, ul, down rate, up rate, peers, size */
     68        final long stats[] = {0,0,0,0,0,0};
    6869       
    6970        String nonce = req.getParameter("nonce");
     
    137138        } else if (snarks.size() > 1) {
    138139            out.write("<tfoot><tr>\n" +
    139                       "    <th align=\"left\" colspan=\"2\">Totals (" + snarks.size() + " torrents, " + stats[4] + " connected peers)</th>\n" +
     140                      "    <th align=\"left\" colspan=\"2\">Totals (" +
     141                      snarks.size() + " torrents, " +
     142                      DataHelper.formatSize(stats[5]) + "B, " +
     143                      stats[4] + " connected peers)</th>\n" +
    140144                      "    <th>&nbsp;</th>\n" +
    141145                      "    <th align=\"right\">" + formatSize(stats[0]) + "</th>\n" +
     
    431435            stats[3] += upBps;
    432436        }
     437        stats[5] += total;
    433438       
    434439        boolean isValid = snark.meta != null;
Note: See TracChangeset for help on using the changeset viewer.