Update of /cvsroot/freenet/freenet/src/freenet/node
In directory sc8-pr-cvs1:/tmp/cvs-serv1348/freenet/src/freenet/node
Modified Files:
FailureTable.java
Log Message:
Do accounting of total blocks and ignores, not just blocks and ignores caused by
current entries
Index: FailureTable.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/FailureTable.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -w -r1.29 -r1.30
--- FailureTable.java 3 Nov 2003 20:41:08 -0000 1.29
+++ FailureTable.java 3 Nov 2003 21:11:21 -0000 1.30
@@ -78,6 +78,9 @@
// }
}
+ protected int totalBlocks;
+ protected int totalIgnores;
+
protected int maxSize;
protected int maxItemsSize;
protected long maxMillis;
@@ -200,6 +203,8 @@
pw.println("<b>Current Key-HTL pairs:</b> " + items.size() + "<br>");
pw.println("<b>Seconds Entries Prevent Routing:</b> " + maxMillis /
1000 + "<br>");
pw.println("<b>Seconds Between Purges:</b> " + cpMillis / 1000 +
"<br>");
+ pw.println("<b>Number of Requests Blocked:</b> " + totalBlocks +
"<br>");
+ pw.println("<b>Number of DNFs Ignored:</b> " + totalIgnores + "<br>");
FailureEntry fe;
long time = System.currentTimeMillis();
int counter = 0;
@@ -216,12 +221,8 @@
}
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 {
@@ -352,6 +353,7 @@
for(Iterator i = myItems.iterator();i.hasNext();) {
if(
(failedTime=((FailItem)i.next()).shouldFail(hopsToLive,time)) >= 0 ) {
blocks++;
+ totalBlocks++;
Core.diagnostics.occurrenceContinuous("timeBetweenFailedRequests",
(double)(time - lastHit));
lastHit = time;
@@ -363,6 +365,7 @@
public void ignoredDNF() {
ignores++;
+ totalIgnores++;
}
public boolean shouldIgnoreDNF(int hopsToLive) {
@@ -375,14 +378,6 @@
// 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