Update of /cvsroot/freenet/freenet/src/freenet/node
In directory sc8-pr-cvs1:/tmp/cvs-serv26789/freenet/src/freenet/node
Modified Files:
FailureTable.java
Log Message:
Just add accounting of total blocks and total ignores to the HTML (It'd be better if
these could go ahead of the tables, but blah)
Index: FailureTable.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/FailureTable.java,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -w -r1.28 -r1.29
--- FailureTable.java 3 Nov 2003 19:14:41 -0000 1.28
+++ FailureTable.java 3 Nov 2003 20:41:08 -0000 1.29
@@ -203,6 +203,8 @@
FailureEntry fe;
long time = System.currentTimeMillis();
int counter = 0;
+ int blocks = 0;
+ int ignores = 0;
for(Enumeration e = entries.elements(); e.hasMoreElements(); counter++ ) {
if ( counter % 100 == 0 ) {
pw.print(counter!=0?"</table>":"");
@@ -214,8 +216,12 @@
}
fe = (FailureEntry)e.nextElement();
fe.toHtml(pw, time);
+ blocks += fe.getBlocks();
+ ignores += fe.getIgnores();
}
pw.println("</table>");
+ pw.println("<br><b>Number of Requests Blocked:</b> " + blocks);
+ pw.println("<br><b>Number of DNFs Ignored:</b> " + ignores);
}
protected class FailItem extends Item {
@@ -369,6 +375,14 @@
// older is "bigger"
long ot = ((FailureEntry) o).lastFail;
return lastFail == ot ? 0 : (lastFail > ot ? -1 : 1);
+ }
+
+ public int getBlocks() {
+ return blocks;
+ }
+
+ public int getIgnores() {
+ return ignores;
}
/**
_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs