Author: zothar
Date: 2006-11-03 20:00:14 +0000 (Fri, 03 Nov 2006)
New Revision: 10811
Modified:
trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java
trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java
trunk/freenet/src/freenet/clients/http/staticfiles/themes/boxed/theme.css
trunk/freenet/src/freenet/clients/http/staticfiles/themes/clean/theme.css
trunk/freenet/src/freenet/clients/http/staticfiles/themes/grayandblue/theme.css
trunk/freenet/src/freenet/clients/http/staticfiles/themes/sky/theme.css
trunk/freenet/src/freenet/node/Node.java
trunk/freenet/src/freenet/node/PeerManager.java
trunk/freenet/src/freenet/node/PeerNode.java
Log:
A couple variable/stat name changes: backedoff -> backedOff and missRouting ->
routingMiss
Modified: trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java
2006-11-03 19:50:58 UTC (rev 10810)
+++ trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java
2006-11-03 20:00:14 UTC (rev 10811)
@@ -132,9 +132,9 @@
networkSizeEstimateRecent =
node.getNetworkSizeEstimate(now - (48*60*60*1000)); // 48 hours
}
DecimalFormat fix4 = new DecimalFormat("0.0000");
- double missRoutingDistance =
node.missRoutingDistance.currentValue();
+ double routingMissDistance =
node.routingMissDistance.currentValue();
DecimalFormat fix1 = new DecimalFormat("##0.0%");
- double backedoffPercent =
node.backedoffPercent.currentValue();
+ double backedOffPercent =
node.backedOffPercent.currentValue();
String nodeUptimeString =
TimeUtil.formatTime(nodeUptimeSeconds * 1000); // *1000 to convert to
milliseconds
// BEGIN OVERVIEW TABLE
@@ -155,8 +155,8 @@
overviewList.addChild("li",
"networkSizeEstimateRecent:\u00a0" + networkSizeEstimateRecent + "\u00a0nodes");
}
overviewList.addChild("li", "nodeUptime:\u00a0"
+ nodeUptimeString);
- overviewList.addChild("li",
"missRoutingDistance:\u00a0" + fix4.format(missRoutingDistance));
- overviewList.addChild("li",
"backedoffPercent:\u00a0" + fix1.format(backedoffPercent));
+ overviewList.addChild("li",
"routingMissDistance:\u00a0" + fix4.format(routingMissDistance));
+ overviewList.addChild("li",
"backedOffPercent:\u00a0" + fix1.format(backedOffPercent));
overviewList.addChild("li",
"pInstantReject:\u00a0" + fix1.format(node.pRejectIncomingInstantly()));
nextTableCell = overviewTableRow.addChild("td");
}
@@ -219,7 +219,7 @@
}
if (numberOfRoutingBackedOff > 0) {
HTMLNode peerStatsRoutingBackedOffListItem =
peerStatsList.addChild("li").addChild("span");
-
peerStatsRoutingBackedOffListItem.addChild("span", new String[] { "class",
"title", "style" }, new String[] { "peer_backedoff", (advancedEnabled ?
"Connected but backed off: These peers are connected but we're backed off of
them" : "Busy: These peers are connected but they're busy") + ", so the node is
not routing requests to them", "border-bottom: 1px dotted; cursor: help;" },
advancedEnabled ? "Backed off" : "Busy");
+
peerStatsRoutingBackedOffListItem.addChild("span", new String[] { "class",
"title", "style" }, new String[] { "peer_backed_off", (advancedEnabled ?
"Connected but backed off: These peers are connected but we're backed off of
them" : "Busy: These peers are connected but they're busy") + ", so the node is
not routing requests to them", "border-bottom: 1px dotted; cursor: help;" },
advancedEnabled ? "Backed off" : "Busy");
peerStatsRoutingBackedOffListItem.addChild("span", ":\u00a0" +
numberOfRoutingBackedOff);
}
if (numberOfTooNew > 0) {
Modified: trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java
2006-11-03 19:50:58 UTC (rev 10810)
+++ trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java
2006-11-03 20:00:14 UTC (rev 10811)
@@ -129,8 +129,8 @@
DecimalFormat fix1p6sci = new
DecimalFormat("0.######E0");
DecimalFormat fix3p1pct = new DecimalFormat("##0.0%");
NumberFormat thousendPoint = NumberFormat.getInstance();
- double missRoutingDistance =
node.missRoutingDistance.currentValue();
- double backedoffPercent =
node.backedoffPercent.currentValue();
+ double routingMissDistance =
node.routingMissDistance.currentValue();
+ double backedOffPercent =
node.backedOffPercent.currentValue();
String nodeUptimeString =
TimeUtil.formatTime(nodeUptimeSeconds * 1000); // *1000 to convert to
milliseconds
HTMLNode overviewTable = contentNode.addChild("table",
"class", "column");
@@ -156,8 +156,8 @@
overviewList.addChild("li",
"avrConnPeersPerNode:\u00a0" +
fix6p6.format(numberOfRemotePeerLocationsSeenInSwaps/(swaps+noSwaps)) +
"\u00a0peers");
}
overviewList.addChild("li", "nodeUptime:\u00a0"
+ nodeUptimeString);
- overviewList.addChild("li",
"missRoutingDistance:\u00a0" + fix1p4.format(missRoutingDistance));
- overviewList.addChild("li",
"backedoffPercent:\u00a0" + fix3p1pct.format(backedoffPercent));
+ overviewList.addChild("li",
"routingMissDistance:\u00a0" + fix1p4.format(routingMissDistance));
+ overviewList.addChild("li",
"backedOffPercent:\u00a0" + fix3p1pct.format(backedOffPercent));
overviewList.addChild("li",
"pInstantReject:\u00a0" + fix3p1pct.format(node.pRejectIncomingInstantly()));
nextTableCell = overviewTableRow.addChild("td");
}
@@ -205,7 +205,7 @@
}
if (numberOfRoutingBackedOff > 0) {
HTMLNode peerStatsRoutingBackedOffListItem =
peerStatsList.addChild("li").addChild("span");
-
peerStatsRoutingBackedOffListItem.addChild("span", new String[] { "class",
"title", "style" }, new String[] { "peer_backedoff", (advancedEnabled ?
"Connected but backed off: These peers are connected but we're backed off of
them" : "Busy: These peers are connected but they're busy") + ", so the node is
not routing requests to them", "border-bottom: 1px dotted; cursor: help;" },
advancedEnabled ? "Backed off" : "Busy");
+
peerStatsRoutingBackedOffListItem.addChild("span", new String[] { "class",
"title", "style" }, new String[] { "peer_backed_off", (advancedEnabled ?
"Connected but backed off: These peers are connected but we're backed off of
them" : "Busy: These peers are connected but they're busy") + ", so the node is
not routing requests to them", "border-bottom: 1px dotted; cursor: help;" },
advancedEnabled ? "Backed off" : "Busy");
peerStatsRoutingBackedOffListItem.addChild("span", ":\u00a0" +
numberOfRoutingBackedOff);
}
if (numberOfTooNew > 0) {
Modified:
trunk/freenet/src/freenet/clients/http/staticfiles/themes/boxed/theme.css
===================================================================
--- trunk/freenet/src/freenet/clients/http/staticfiles/themes/boxed/theme.css
2006-11-03 19:50:58 UTC (rev 10810)
+++ trunk/freenet/src/freenet/clients/http/staticfiles/themes/boxed/theme.css
2006-11-03 20:00:14 UTC (rev 10811)
@@ -146,7 +146,7 @@
color: #080;
}
-.peer_backedoff {
+.peer_backed_off {
color: #840;
}
Modified:
trunk/freenet/src/freenet/clients/http/staticfiles/themes/clean/theme.css
===================================================================
--- trunk/freenet/src/freenet/clients/http/staticfiles/themes/clean/theme.css
2006-11-03 19:50:58 UTC (rev 10810)
+++ trunk/freenet/src/freenet/clients/http/staticfiles/themes/clean/theme.css
2006-11-03 20:00:14 UTC (rev 10811)
@@ -298,7 +298,7 @@
color: #008000;
}
-span.peer_backedoff {
+span.peer_backed_off {
color: #ff8c00;
}
Modified:
trunk/freenet/src/freenet/clients/http/staticfiles/themes/grayandblue/theme.css
===================================================================
---
trunk/freenet/src/freenet/clients/http/staticfiles/themes/grayandblue/theme.css
2006-11-03 19:50:58 UTC (rev 10810)
+++
trunk/freenet/src/freenet/clients/http/staticfiles/themes/grayandblue/theme.css
2006-11-03 20:00:14 UTC (rev 10811)
@@ -312,7 +312,7 @@
color: #008000;
}
-table.darknet_connections span.peer_backedoff {
+table.darknet_connections span.peer_backed_off {
color: #ff0000;
}
Modified:
trunk/freenet/src/freenet/clients/http/staticfiles/themes/sky/theme.css
===================================================================
--- trunk/freenet/src/freenet/clients/http/staticfiles/themes/sky/theme.css
2006-11-03 19:50:58 UTC (rev 10810)
+++ trunk/freenet/src/freenet/clients/http/staticfiles/themes/sky/theme.css
2006-11-03 20:00:14 UTC (rev 10811)
@@ -306,7 +306,7 @@
color: #008000;
}
-table.darknet_connections span.peer_backedoff {
+table.darknet_connections span.peer_backed_off {
color: #706000;
}
Modified: trunk/freenet/src/freenet/node/Node.java
===================================================================
--- trunk/freenet/src/freenet/node/Node.java 2006-11-03 19:50:58 UTC (rev
10810)
+++ trunk/freenet/src/freenet/node/Node.java 2006-11-03 20:00:14 UTC (rev
10811)
@@ -481,8 +481,8 @@
private static final boolean USE_RAM_PUBKEYS_CACHE = true;
// various metrics
- public RunningAverage missRoutingDistance = new
TimeDecayingRunningAverage(0.0, 180000, 0.0, 1.0);
- public RunningAverage backedoffPercent = new
TimeDecayingRunningAverage(0.0, 180000, 0.0, 1.0);
+ public RunningAverage routingMissDistance = new
TimeDecayingRunningAverage(0.0, 180000, 0.0, 1.0);
+ public RunningAverage backedOffPercent = new
TimeDecayingRunningAverage(0.0, 180000, 0.0, 1.0);
protected final ThrottlePersister throttlePersister;
/**
@@ -1697,8 +1697,8 @@
fs.put("networkSizeEstimate24hourRecent",
Integer.toString(networkSizeEstimate24hourRecent));
int networkSizeEstimate48hourRecent =
getNetworkSizeEstimate(now - (48*60*60*1000)); // 48 hours
fs.put("networkSizeEstimate48hourRecent",
Integer.toString(networkSizeEstimate48hourRecent));
- fs.put("missRoutingDistance",
Double.toString(missRoutingDistance.currentValue()));
- fs.put("backedoffPercent",
Double.toString(backedoffPercent.currentValue()));
+ fs.put("routingMissDistance",
Double.toString(routingMissDistance.currentValue()));
+ fs.put("backedOffPercent",
Double.toString(backedOffPercent.currentValue()));
fs.put("pInstantReject",
Double.toString(pRejectIncomingInstantly()));
/* gather connection statistics */
Modified: trunk/freenet/src/freenet/node/PeerManager.java
===================================================================
--- trunk/freenet/src/freenet/node/PeerManager.java 2006-11-03 19:50:58 UTC
(rev 10810)
+++ trunk/freenet/src/freenet/node/PeerManager.java 2006-11-03 20:00:14 UTC
(rev 10811)
@@ -458,11 +458,11 @@
if (calculateMisrouting) {
PeerNode nbo = _closerPeer(pn, routedTo, notIgnored, loc,
ignoreSelf, true, minVersion);
if(nbo != null) {
- node.missRoutingDistance.report(distance(best,
nbo.getLocation().getValue()));
+ node.routingMissDistance.report(distance(best,
nbo.getLocation().getValue()));
int numberOfConnected =
node.getPeerNodeStatusSize(Node.PEER_NODE_STATUS_CONNECTED);
int numberOfRoutingBackedOff =
node.getPeerNodeStatusSize(Node.PEER_NODE_STATUS_ROUTING_BACKED_OFF);
if (numberOfRoutingBackedOff + numberOfConnected > 0 ) {
- node.backedoffPercent.report((double)
numberOfRoutingBackedOff / (double) (numberOfRoutingBackedOff +
numberOfConnected));
+ node.backedOffPercent.report((double)
numberOfRoutingBackedOff / (double) (numberOfRoutingBackedOff +
numberOfConnected));
}
}
}
Modified: trunk/freenet/src/freenet/node/PeerNode.java
===================================================================
--- trunk/freenet/src/freenet/node/PeerNode.java 2006-11-03 19:50:58 UTC
(rev 10810)
+++ trunk/freenet/src/freenet/node/PeerNode.java 2006-11-03 20:00:14 UTC
(rev 10811)
@@ -2032,7 +2032,7 @@
String lastRoutingBackoffReason;
/** Previous backoff reason (used by setPeerNodeStatus)*/
String previousRoutingBackoffReason;
- /* percent of time this peer is backedoff */
+ /* percent of time this peer is backed off */
public RunningAverage backedOffPercent = new
TimeDecayingRunningAverage(0.0, 180000, 0.0, 1.0);
/* time of last sample */
private long lastSampleTime = Long.MAX_VALUE;
@@ -2353,7 +2353,7 @@
if(status == Node.PEER_NODE_STATUS_CONNECTED)
return "peer_connected";
if(status == Node.PEER_NODE_STATUS_ROUTING_BACKED_OFF)
- return "peer_backedoff";
+ return "peer_backed_off";
if(status == Node.PEER_NODE_STATUS_TOO_NEW)
return "peer_too_new";
if(status == Node.PEER_NODE_STATUS_TOO_OLD)