Update of /cvsroot/freenet/freenet/src/freenet/node/rt In directory sc8-pr-cvs1:/tmp/cvs-serv5171/src/freenet/node/rt
Modified Files: NGRouting.java Log Message: 6309: Add new diagnostic searchFailedCount, to measure impact of QRing on the node, fix an NPE in interfaces. Index: NGRouting.java =================================================================== RCS file: /cvsroot/freenet/freenet/src/freenet/node/rt/NGRouting.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -w -r1.19 -r1.20 --- NGRouting.java 4 Nov 2003 01:24:25 -0000 1.19 +++ NGRouting.java 4 Nov 2003 19:49:43 -0000 1.20 @@ -1,3 +1,4 @@ +/* -*- Mode: java; c-basic-indent: 4; tab-width: 4 -*- */ package freenet.node.rt; import freenet.Core; @@ -30,6 +31,8 @@ boolean hasSearchFailed = false; long origStartTime; boolean isInsert; + int searchFailedCount = 0; + boolean didNotQuicklyRNF = false; NGRouting(NGRoutingTable ngrt, Estimate[] list, int maxSteps, Key k, boolean doDesperate, Node n, boolean isInsert) { @@ -151,6 +154,7 @@ } public void searchFailed(long time) { + searchFailedCount++; if(!hasSearchFailed) { hasSearchFailed = true; last.searchFailed(time); @@ -162,6 +166,7 @@ public void transferFailed(long time, int htl, long size, long transferTime) { + didNotQuicklyRNF = true; long now = System.currentTimeMillis(); long diff = now - lastTime; if(diff < 0 || diff > 3600*1000) { @@ -177,6 +182,7 @@ public void transferSucceeded(long searchTime, int htl, long size, long transferTime) { + didNotQuicklyRNF = true; last.transferSucceeded(key, searchTime, htl, size, transferTime); long stdFileSize; if(node.dir.countKeys() > 16) @@ -217,6 +223,8 @@ // nodes that will just Query Reject. edt ngrt.globalEstimator.reportTime(key, t); } + if(routingRelated && didNotQuicklyRNF && !isInsert) + Core.diagnostics.occurrenceContinuous("searchFailedCount", searchFailedCount); if(isInsert && (!noDiag)) { if(routingRelated) Core.diagnostics.occurrenceBinomial("insertRoutingSuccessRatio", @@ -232,6 +240,7 @@ public void dataNotFound(int htl) { long now = System.currentTimeMillis(); + didNotQuicklyRNF = true; if(!ignoreDNF) { last.dataNotFound(key, now - lastTime, htl); } else { _______________________________________________ cvs mailing list [EMAIL PROTECTED] http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs