From cdee5b2c31c615a65464bb483bc6be0aa04039e7 Mon Sep 17 00:00:00 2001
From: jrandom <jrandom>
Date: Fri, 7 Oct 2005 20:19:04 +0000
Subject: [PATCH] * 2005-10-07  0.6.1.2 released 2005-10-07  jrandom     *
 Include the 1 second bandwidth usage on the console rather than the       1
 minute rate, as the 1 second value doesn't have the 1m/5m quantization      
 issues.

---
 .../java/src/net/i2p/router/web/SummaryHelper.java   | 12 ++----------
 apps/routerconsole/jsp/summary.jsp                   |  2 +-
 core/java/src/net/i2p/CoreVersion.java               |  4 ++--
 history.txt                                          |  9 ++++++++-
 initialNews.xml                                      |  4 ++--
 installer/install.xml                                |  2 +-
 news.xml                                             |  8 +++++---
 router/java/src/net/i2p/router/RouterVersion.java    |  6 +++---
 .../i2p/router/transport/FIFOBandwidthLimiter.java   | 10 ++++++----
 9 files changed, 30 insertions(+), 27 deletions(-)

diff --git a/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java
index d02b29914a..1c26f5bd07 100644
--- a/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java
+++ b/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java
@@ -205,11 +205,7 @@ public class SummaryHelper {
     public String getInboundMinuteKBps() { 
         if (_context == null) 
             return "0.0";
-        
-        RateStat receiveRate = _context.statManager().getRate("bw.recvRate");
-        if (receiveRate == null) return "0.0";
-        Rate rate = receiveRate.getRate(60*1000);
-        double kbps = rate.getAverageValue()/1024;
+        double kbps = _context.bandwidthLimiter().getReceiveBps()/1024d;
         DecimalFormat fmt = new DecimalFormat("##0.00");
         return fmt.format(kbps);
     }
@@ -221,11 +217,7 @@ public class SummaryHelper {
     public String getOutboundMinuteKBps() { 
         if (_context == null) 
             return "0.0";
-        
-        RateStat receiveRate = _context.statManager().getRate("bw.sendRate");
-        if (receiveRate == null) return "0.0";
-        Rate rate = receiveRate.getRate(60*1000);
-        double kbps = rate.getAverageValue()/1024;
+        double kbps = _context.bandwidthLimiter().getSendBps()/1024d;
         DecimalFormat fmt = new DecimalFormat("##0.00");
         return fmt.format(kbps);
     }
diff --git a/apps/routerconsole/jsp/summary.jsp b/apps/routerconsole/jsp/summary.jsp
index 8fb1bf414e..ad45e9328c 100644
--- a/apps/routerconsole/jsp/summary.jsp
+++ b/apps/routerconsole/jsp/summary.jsp
@@ -64,7 +64,7 @@
  %><hr />
  
  <u><b>Bandwidth in/out</b></u><br />
- <b>1m:</b> <jsp:getProperty name="helper" property="inboundMinuteKBps" />/<jsp:getProperty name="helper" property="outboundMinuteKBps" />KBps<br />
+ <b>1s:</b> <jsp:getProperty name="helper" property="inboundMinuteKBps" />/<jsp:getProperty name="helper" property="outboundMinuteKBps" />KBps<br />
  <b>5m:</b> <jsp:getProperty name="helper" property="inboundFiveMinuteKBps" />/<jsp:getProperty name="helper" property="outboundFiveMinuteKBps" />KBps<br />
  <b>Total:</b> <jsp:getProperty name="helper" property="inboundLifetimeKBps" />/<jsp:getProperty name="helper" property="outboundLifetimeKBps" />KBps<br />
  <b>Used:</b> <jsp:getProperty name="helper" property="inboundTransferred" />/<jsp:getProperty name="helper" property="outboundTransferred" /><br />
diff --git a/core/java/src/net/i2p/CoreVersion.java b/core/java/src/net/i2p/CoreVersion.java
index 05555718da..382306bdfe 100644
--- a/core/java/src/net/i2p/CoreVersion.java
+++ b/core/java/src/net/i2p/CoreVersion.java
@@ -14,8 +14,8 @@ package net.i2p;
  *
  */
 public class CoreVersion {
-    public final static String ID = "$Revision: 1.43 $ $Date: 2005/09/29 14:19:23 $";
-    public final static String VERSION = "0.6.1.1";
+    public final static String ID = "$Revision: 1.44 $ $Date: 2005/10/01 14:20:09 $";
+    public final static String VERSION = "0.6.1.2";
 
     public static void main(String args[]) {
         System.out.println("I2P Core version: " + VERSION);
diff --git a/history.txt b/history.txt
index 2ea7f51bd0..7e082915ac 100644
--- a/history.txt
+++ b/history.txt
@@ -1,4 +1,11 @@
-$Id: history.txt,v 1.283 2005/10/05 18:24:33 jrandom Exp $
+$Id: history.txt,v 1.284 2005/10/07 05:23:01 jrandom Exp $
+
+* 2005-10-07  0.6.1.2 released
+
+2005-10-07  jrandom
+    * Include the 1 second bandwidth usage on the console rather than the 
+      1 minute rate, as the 1 second value doesn't have the 1m/5m quantization
+      issues.
 
 2005-10-07  jrandom
     * Allow the I2PTunnelHTTPServer to send back the first few packets of an
diff --git a/initialNews.xml b/initialNews.xml
index 86ee01ded5..b55013c00c 100644
--- a/initialNews.xml
+++ b/initialNews.xml
@@ -1,5 +1,5 @@
-<i2p.news date="$Date: 2005/09/29 14:19:23 $">
- <i2p.release version="0.6.1.1" date="2005/10/01" minVersion="0.6"
+<i2p.news date="$Date: 2005/10/01 14:20:10 $">
+ <i2p.release version="0.6.1.2" date="2005/10/07" minVersion="0.6"
               anonurl="http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/i2p/i2pupdate.sud"
               publicurl="http://dev.i2p.net/i2p/i2pupdate.sud"
               anonannouncement="http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/pipermail/i2p/2005-September/000878.html" 
diff --git a/installer/install.xml b/installer/install.xml
index 426d92325d..dffedbe0e2 100644
--- a/installer/install.xml
+++ b/installer/install.xml
@@ -4,7 +4,7 @@
 
     <info>
         <appname>i2p</appname>
-        <appversion>0.6.1.1</appversion>
+        <appversion>0.6.1.2</appversion>
         <authors>
             <author name="I2P" email="support@i2p.net"/>
         </authors>
diff --git a/news.xml b/news.xml
index 473868fd02..0c01ac8c6c 100644
--- a/news.xml
+++ b/news.xml
@@ -1,5 +1,5 @@
-<i2p.news date="$Date: 2005/09/29 14:19:23 $">
- <i2p.release version="0.6.1.1" date="2005/10/01" minVersion="0.6"
+<i2p.news date="$Date: 2005/10/01 14:20:10 $">
+ <i2p.release version="0.6.1.2" date="2005/10/07" minVersion="0.6"
               anonurl="http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/i2p/i2pupdate.sud"
               publicurl="http://dev.i2p.net/i2p/i2pupdate.sud"
               anonannouncement="http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/pipermail/i2p/2005-September/000878.html" 
@@ -9,5 +9,7 @@
             publicurl="http://dev.i2p.net/pipermail/i2p/2005-July/000826.html"
             anonlogs="http://i2p/Nf3ab-ZFkmI-LyMt7GjgT-jfvZ3zKDl0L96pmGQXF1B82W2Bfjf0n7~288vafocjFLnQnVcmZd~-p0-Oolfo9aW2Rm-AhyqxnxyLlPBqGxsJBXjPhm1JBT4Ia8FB-VXt0BuY0fMKdAfWwN61-tj4zIcQWRxv3DFquwEf035K~Ra4SWOqiuJgTRJu7~o~DzHVljVgWIzwf8Z84cz0X33pv-mdG~~y0Bsc2qJVnYwjjR178YMcRSmNE0FVMcs6f17c6zqhMw-11qjKpY~EJfHYCx4lBWF37CD0obbWqTNUIbL~78vxqZRT3dgAgnLixog9nqTO-0Rh~NpVUZnoUi7fNR~awW5U3Cf7rU7nNEKKobLue78hjvRcWn7upHUF45QqTDuaM3yZa7OsjbcH-I909DOub2Q0Dno6vIwuA7yrysccN1sbnkwZbKlf4T6~iDdhaSLJd97QCyPOlbyUfYy9QLNExlRqKgNVJcMJRrIual~Lb1CLbnzt0uvobM57UpqSAAAA/meeting141"
             publiclogs="http://www.i2p.net/meeting141" />
-&#149; The new 0.6.1.1 release should help fix some long standing bugs, give it a try!<br />
+&#149; Tip: if an eepsite isn't reachable, it may not be online - <a href="http://orion.i2p/">orion</a> or 
+       <a href="http://polecat.i2p/i2psurvey/">polecat</a> tells whether they can reach the site as well<br />
+&#149; I2Phex users should keep track of the progress on the <a href="http://forum.i2p/viewforum.i2p?f=25">forum</a><br />
 </i2p.news>
diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java
index 9e4e506ce2..9f36e5900c 100644
--- a/router/java/src/net/i2p/router/RouterVersion.java
+++ b/router/java/src/net/i2p/router/RouterVersion.java
@@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
  *
  */
 public class RouterVersion {
-    public final static String ID = "$Revision: 1.258 $ $Date: 2005/10/05 18:24:33 $";
-    public final static String VERSION = "0.6.1.1";
-    public final static long BUILD = 5;
+    public final static String ID = "$Revision: 1.259 $ $Date: 2005/10/07 05:23:01 $";
+    public final static String VERSION = "0.6.1.2";
+    public final static long BUILD = 0;
     public static void main(String args[]) {
         System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
         System.out.println("Router ID: " + RouterVersion.ID);
diff --git a/router/java/src/net/i2p/router/transport/FIFOBandwidthLimiter.java b/router/java/src/net/i2p/router/transport/FIFOBandwidthLimiter.java
index 8f897000a8..2b2e1dd47a 100644
--- a/router/java/src/net/i2p/router/transport/FIFOBandwidthLimiter.java
+++ b/router/java/src/net/i2p/router/transport/FIFOBandwidthLimiter.java
@@ -97,6 +97,8 @@ public class FIFOBandwidthLimiter {
     public void setInboundUnlimited(boolean isUnlimited) { _inboundUnlimited = isUnlimited; }
     public boolean getOutboundUnlimited() { return _outboundUnlimited; }
     public void setOutboundUnlimited(boolean isUnlimited) { _outboundUnlimited = isUnlimited; }
+    public float getSendBps() { return _sendBps; }
+    public float getReceiveBps() { return _recvBps; }
     
     public void reinitialize() {
         _pendingInboundRequests.clear();
@@ -262,13 +264,13 @@ public class FIFOBandwidthLimiter {
             _lastTotalReceived = totR;
             _lastStatsUpdated = now;
             if (_sendBps <= 0)
-                _sendBps = ((float)sent*time)/1000f;
+                _sendBps = ((float)sent*1000f)/(float)time;
             else
-                _sendBps = (0.9f)*_sendBps + (0.1f)*((float)sent*time)/1000f;
+                _sendBps = (0.9f)*_sendBps + (0.1f)*((float)sent*1000f)/(float)time;
             if (_recvBps <= 0)
-                _recvBps = ((float)recv*time)/1000f;
+                _recvBps = ((float)recv*1000f)/(float)time;
             else
-                _recvBps = (0.9f)*_recvBps + (0.1f)*((float)recv*time)/1000f;
+                _recvBps = (0.9f)*_recvBps + (0.1f)*((float)recv*1000)/(float)time;
             if (_log.shouldLog(Log.WARN)) {
                 if (_log.shouldLog(Log.INFO))
                     _log.info("BW: time = " + time + " sent: " + sent + " recv: " + recv);
-- 
GitLab