2006-03-17 jrandom

* Add support for graphing the event count as well as the average stat
      value (done by adding &showEvents=true to the URL).  Also supports
      hiding the legend (&hideLegend=true), the grid (&hideGrid=true), and
      the title (&hideTitle=true).
    * Removed an unnecessary arbitrary filter on the profile organizer so we
      can pick high capacity and fast peers more appropriately
This commit is contained in:
jrandom
2006-03-17 23:46:00 +00:00
committed by zzz
parent 52094b10c9
commit b03ff21d3b
7 changed files with 57 additions and 22 deletions

View File

@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
*
*/
public class RouterVersion {
public final static String ID = "$Revision: 1.372 $ $Date: 2006/03/15 19:49:23 $";
public final static String ID = "$Revision: 1.373 $ $Date: 2006/03/16 16:45:26 $";
public final static String VERSION = "0.6.1.12";
public final static long BUILD = 10;
public final static long BUILD = 11;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
System.out.println("Router ID: " + RouterVersion.ID);

View File

@ -184,6 +184,8 @@ public class StatsGenerator {
buf.append(" <a href=\"viewstat.jsp?stat=").append(name);
buf.append("&amp;period=").append(periods[i]);
buf.append("\" title=\"Render summarized data\">render</a>");
buf.append(" <a href=\"viewstat.jsp?stat=").append(name);
buf.append("&amp;period=").append(periods[i]).append("&amp;showEvents=true\" title=\"Render summarized event counts\">events</a>");
buf.append(" (as <a href=\"viewstat.jsp?stat=").append(name);
buf.append("&amp;period=").append(periods[i]);
buf.append("&amp;format=xml\" title=\"Dump stat history as XML\">XML</a>");

View File

@ -482,9 +482,10 @@ public class ProfileOrganizer {
placeTime = System.currentTimeMillis()-placeStart;
if (_log.shouldLog(Log.DEBUG)) {
_log.debug("Profiles reorganized. averages: [integration: " + _thresholdIntegrationValue
if (_log.shouldLog(Log.INFO))
_log.info("Profiles reorganized. averages: [integration: " + _thresholdIntegrationValue
+ ", capacity: " + _thresholdCapacityValue + ", speed: " + _thresholdSpeedValue + "]");
if (_log.shouldLog(Log.DEBUG)) {
StringBuffer buf = new StringBuffer(512);
for (Iterator iter = _strictCapacityOrder.iterator(); iter.hasNext(); ) {
PeerProfile prof = (PeerProfile)iter.next();
@ -522,7 +523,7 @@ public class ProfileOrganizer {
if ( (!_fastPeers.containsKey(cur.getPeer())) && (!cur.getIsFailing()) ) {
if (!isSelectable(cur.getPeer())) {
// skip peers we dont have in the netDb
if (_log.shouldLog(Log.INFO))
if (_log.shouldLog(Log.INFO))
_log.info("skip unknown peer from fast promotion: " + cur.getPeer().toBase64());
continue;
}
@ -611,8 +612,9 @@ public class ProfileOrganizer {
continue;
// dont bother trying to make sense of things below the baseline
if (profile.getCapacityValue() <= CapacityCalculator.GROWTH_FACTOR)
continue;
// otoh, keep them in the threshold calculation, so we can adapt
////if (profile.getCapacityValue() <= CapacityCalculator.GROWTH_FACTOR)
//// continue;
totalCapacity += profile.getCapacityValue();
totalIntegration += profile.getIntegrationValue();