* 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.
This commit is contained in:
jrandom
2005-10-07 20:19:04 +00:00
committed by zzz
parent 7f6e65c76f
commit cdee5b2c31
9 changed files with 30 additions and 27 deletions

View File

@ -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);
}