Update of /cvsroot/freenet/freenet/src/freenet/node/rt
In directory sc8-pr-cvs1:/tmp/cvs-serv16830/src/freenet/node/rt

Modified Files:
        NGRouting.java Routing.java TerminatableRouting.java 
Log Message:
logging, don't report inserts on ngrt.globalEstimator, don't log diagnostics when we 
don't actually use the routing for routing (in sendingreply), only decrement the 
hopsToLive on a QueryReject (to hopefully improve insert performance), logger fixes


Index: NGRouting.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/rt/NGRouting.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- NGRouting.java      2 Sep 2003 17:05:22 -0000       1.3
+++ NGRouting.java      2 Sep 2003 21:37:32 -0000       1.4
@@ -189,15 +189,15 @@
        super.reallyTerminate(success, routingRelated);
        if(logDEBUG)
            Core.logger.log(this, "reallyTerminating("+success+","+
-                           routingRelated+") "+toString(), Logger.DEBUG);
+                           routingRelated+","+noDiag+") "+toString(), Logger.DEBUG);
        desperate = true;
        count = maxSteps+1;
        at = list.length;
        long t = System.currentTimeMillis()-origStartTime;
-       if(routingRelated) {
+       if(routingRelated && !isInsert) { // inserts include AwaitingStoreData...
            ngrt.globalEstimator.reportTime(key, t);
        }
-       if(isInsert) {
+       if(isInsert && (!noDiag)) {
            if(routingRelated)
                Core.diagnostics.occurrenceBinomial("insertRoutingSuccessRatio", 
                                                    1, (success?1:0));

Index: Routing.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/rt/Routing.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Routing.java        30 Aug 2003 23:16:52 -0000      1.7
+++ Routing.java        2 Sep 2003 21:37:32 -0000       1.8
@@ -121,6 +121,12 @@
      * because of external circumstances e.g. ran out of HTL
      */
     void terminate(boolean success, boolean routingRelated);
+    
+    /**
+     * Called to terminate the Routing when we haven't actually tried
+     * any network activity i.e. it's been used to determine which ref
+     * to send on */
+    void terminateNoDiagnostic();
 }
 
 

Index: TerminatableRouting.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/rt/TerminatableRouting.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TerminatableRouting.java    2 Sep 2003 17:05:22 -0000       1.3
+++ TerminatableRouting.java    2 Sep 2003 21:37:32 -0000       1.4
@@ -8,6 +8,7 @@
  */
 abstract class TerminatableRouting implements Routing {
     boolean terminated = false;
+    boolean noDiag = false;
     
     public void terminate(boolean success, boolean routingRelated) {
        if(terminated) return;
@@ -15,7 +16,15 @@
        reallyTerminate(success, routingRelated);
     }
     
+    public void terminateNoDiagnostic() {
+       if(terminated) return;
+       terminated = true;
+       noDiag = true;
+       reallyTerminate(false, false);
+    }
+    
     protected void reallyTerminate(boolean success, boolean routingRelated) {
+       if(noDiag) return;
        Core.logger.log(this, "reallyTerminate("+success+","+routingRelated+") for 
"+this,
                        new Exception("debug"), Logger.DEBUG);
        Core.diagnostics.occurrenceBinomial("requestSuccessRatio", 1, 

_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to