Author: toad
Date: 2008-04-19 19:51:26 +0000 (Sat, 19 Apr 2008)
New Revision: 19448

Modified:
   trunk/freenet/src/freenet/node/NodeStats.java
Log:
Logging

Modified: trunk/freenet/src/freenet/node/NodeStats.java
===================================================================
--- trunk/freenet/src/freenet/node/NodeStats.java       2008-04-19 19:45:58 UTC 
(rev 19447)
+++ trunk/freenet/src/freenet/node/NodeStats.java       2008-04-19 19:51:26 UTC 
(rev 19448)
@@ -493,10 +493,12 @@
                // So impose a minimum of 20% of the bandwidth limit.
                // This will ensure we don't get stuck in any situation where 
all our bandwidth is overhead,
                // and we don't accept any requests because of that, so it 
remains that way...
+               if(logMINOR) Logger.minor(this, "Overhead per second: 
"+sentOverheadPerSecond+" bwlimit: "+node.getOutputBandwidthLimit()+" => output 
available per second: "+outputAvailablePerSecond+" but minimum of 
"+node.getOutputBandwidthLimit() / 5.0);
                outputAvailablePerSecond = Math.max(outputAvailablePerSecond, 
node.getOutputBandwidthLimit() / 5.0);

                double bandwidthAvailableOutput = outputAvailablePerSecond * 90;
                // 90 seconds at full power; we have to leave some time for the 
search as well
+               if(logMINOR) Logger.minor(this, "90 second limit: 
"+bandwidthAvailableOutput+" expected output liability: 
"+bandwidthLiabilityOutput);

                if(bandwidthLiabilityOutput > bandwidthAvailableOutput) {
                        pInstantRejectIncoming.report(1.0);


Reply via email to