* ProfileOrganizer:

- Don't require a peer to be high-capacity to be
         well-integrated (not used for anything right now,
         but want to get it right for possible floodfill verification)
       - Don't fall back to median for high-capacity threshold
         if the mean is higher than the median, this prevents
         frequent large high-capacity counts
       - Fix high-capacity selector that picked one too many
    * Console: put well-integrated count back in the summary
This commit is contained in:
zzz
2008-03-11 22:59:47 +00:00
parent e6a0c2f4f0
commit 46307c60d4
4 changed files with 39 additions and 12 deletions

View File

@ -40,7 +40,7 @@
<b>Active:</b> <jsp:getProperty name="helper" property="activePeers" />/<jsp:getProperty name="helper" property="activeProfiles" /><br />
<b>Fast:</b> <jsp:getProperty name="helper" property="fastPeers" /><br />
<b>High capacity:</b> <jsp:getProperty name="helper" property="highCapacityPeers" /><br />
<!-- <b>Well integrated:</b> <jsp:getProperty name="helper" property="wellIntegratedPeers" /><br /> -->
<b>Well integrated:</b> <jsp:getProperty name="helper" property="wellIntegratedPeers" /><br />
<b>Failing:</b> <jsp:getProperty name="helper" property="failingPeers" /><br />
<!-- <b>Shitlisted:</b> <jsp:getProperty name="helper" property="shitlistedPeers" /><br /> -->
<b>Known:</b> <jsp:getProperty name="helper" property="allPeers" /><br /><%

View File

@ -1,3 +1,14 @@
2008-03-11 zzz
* ProfileOrganizer:
- Don't require a peer to be high-capacity to be
well-integrated (not used for anything right now,
but want to get it right for possible floodfill verification)
- Don't fall back to median for high-capacity threshold
if the mean is higher than the median, this prevents
frequent large high-capacity counts
- Fix high-capacity selector that picked one too many
* Console: put well-integrated count back in the summary
2008-03-10 zzz
* EepGet: Fix byte count for bytesTransferred status listeners
(fixes command line status)

View File

@ -17,7 +17,7 @@ import net.i2p.CoreVersion;
public class RouterVersion {
public final static String ID = "$Revision: 1.548 $ $Date: 2008-02-10 15:00:00 $";
public final static String VERSION = "0.6.1.32";
public final static long BUILD = 3;
public final static long BUILD = 4;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
System.out.println("Router ID: " + RouterVersion.ID);

View File

@ -653,7 +653,10 @@ public class ProfileOrganizer {
locked_calculateCapacityThreshold(totalCapacity, reordered);
locked_calculateSpeedThreshold(reordered);
_thresholdIntegrationValue = 1.0d * avg(totalIntegration, reordered.size());
if (totalIntegration > 0)
_thresholdIntegrationValue = 1.0d * avg(totalIntegration, reordered.size());
else // Make nobody rather than everybody well-integrated
_thresholdIntegrationValue = 1.0d;
}
/**
@ -685,7 +688,7 @@ public class ProfileOrganizer {
numExceedingMean++;
if (cur == reordered.size()/2)
thresholdAtMedian = val;
if (cur == minHighCapacityPeers)
if (cur == minHighCapacityPeers - 1)
thresholdAtMinHighCap = val;
if (cur == reordered.size() -1)
thresholdAtLowest = val;
@ -698,12 +701,20 @@ public class ProfileOrganizer {
_log.info("Our average capacity is doing well [" + meanCapacity
+ "], and includes " + numExceedingMean);
_thresholdCapacityValue = meanCapacity;
// else if mean > median && reordered.size > minHighCapacitiyPeers then threshold = reordered.get(minHighCapacity).getCapacityValue()
} else if (meanCapacity > thresholdAtMedian &&
reordered.size()/2 > minHighCapacityPeers) {
// avg > median, get the min High Cap peers
if (_log.shouldLog(Log.INFO))
_log.info("Our average capacity [" + meanCapacity + "] is greater than the median,"
+ " so threshold is that reqd to get the min high cap peers " + thresholdAtMinHighCap);
_thresholdCapacityValue = thresholdAtMinHighCap;
} else if (reordered.size()/2 >= minHighCapacityPeers) {
// ok mean is skewed low, but we still have enough to use the median
// We really don't want to be here, since the default is 5.0 and the median
// is inevitably 5.01 or so.
if (_log.shouldLog(Log.INFO))
_log.info("Our average capacity is skewed under the median [" + meanCapacity
+ "], so use the median threshold " + thresholdAtMedian);
_log.info("Our average capacity [" + meanCapacity + "] is skewed under the median,"
+ " so use the median threshold " + thresholdAtMedian);
_thresholdCapacityValue = thresholdAtMedian;
} else {
// our average is doing well, but not enough peers
@ -979,14 +990,19 @@ public class ProfileOrganizer {
}
}
if (_thresholdIntegrationValue <= profile.getIntegrationValue()) {
_wellIntegratedPeers.put(profile.getPeer(), profile);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Integrated: \t" + profile.getPeer().toBase64());
}
} else {
// not high capacity, but not failing (yet)
}
// We aren't using the well-integrated list yet...
// But by observation, the floodfill peers are often not in the
// high-capacity group, so let's not require a peer to be high-capactiy
// to call him well-integrated.
// This could be used later to see if a floodfill peer is for real.
if (_thresholdIntegrationValue <= profile.getIntegrationValue()) {
_wellIntegratedPeers.put(profile.getPeer(), profile);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Integrated: \t" + profile.getPeer().toBase64());
}
}
}