Author: toad
Date: 2008-02-07 13:30:34 +0000 (Thu, 07 Feb 2008)
New Revision: 17656
Modified:
trunk/freenet/src/freenet/node/NodeStats.java
Log:
Actually use the count of running offer replies in shouldRejectRequest().
Modified: trunk/freenet/src/freenet/node/NodeStats.java
===================================================================
--- trunk/freenet/src/freenet/node/NodeStats.java 2008-02-07 13:27:56 UTC
(rev 17655)
+++ trunk/freenet/src/freenet/node/NodeStats.java 2008-02-07 13:30:34 UTC
(rev 17656)
@@ -477,7 +477,9 @@
successfulChkFetchBytesSentAverage.currentValue() *
numCHKRequests +
successfulSskFetchBytesSentAverage.currentValue() *
numSSKRequests +
successfulChkInsertBytesSentAverage.currentValue() *
numCHKInserts +
- successfulSskInsertBytesSentAverage.currentValue() *
numSSKInserts;
+ successfulSskInsertBytesSentAverage.currentValue() *
numSSKInserts +
+ successfulChkOfferReplyBytesSentAverage.currentValue()
* numCHKOfferReplies +
+ successfulSskOfferReplyBytesSentAverage.currentValue()
* numSSKOfferReplies;
double bandwidthAvailableOutput =
node.getOutputBandwidthLimit() * 90; // 90 seconds at
full power; we have to leave some time for the search as well
bandwidthAvailableOutput *=
NodeStats.FRACTION_OF_BANDWIDTH_USED_BY_REQUESTS;
@@ -491,7 +493,9 @@
successfulChkFetchBytesReceivedAverage.currentValue() *
numCHKRequests +
successfulSskFetchBytesReceivedAverage.currentValue() *
numSSKRequests +
successfulChkInsertBytesReceivedAverage.currentValue()
* numCHKInserts +
- successfulSskInsertBytesReceivedAverage.currentValue()
* numSSKInserts;
+ successfulSskInsertBytesReceivedAverage.currentValue()
* numSSKInserts +
+
successfulChkOfferReplyBytesReceivedAverage.currentValue() * numCHKOfferReplies
+
+
successfulSskOfferReplyBytesReceivedAverage.currentValue() * numSSKOfferReplies;
double bandwidthAvailableInput =
node.getInputBandwidthLimit() * 90; // 90 seconds at
full power
bandwidthAvailableInput *=
NodeStats.FRACTION_OF_BANDWIDTH_USED_BY_REQUESTS;