From 4622f369c399b3fd9c7e9675371bd0e6f94173f0 Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Sun, 21 Jun 2009 00:00:39 +0000 Subject: [PATCH] Pluck of revision aad5b15235be51189b696e6cabb7cc04e1b5e89f from branch i2p.i2p.zzz.test --------------------------------------------------------------------------------------- post-0.7.4 cleanup --- .../src/net/i2p/router/StatisticsManager.java | 30 ++----------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/router/java/src/net/i2p/router/StatisticsManager.java b/router/java/src/net/i2p/router/StatisticsManager.java index f107c5e1e9..9293a6234a 100644 --- a/router/java/src/net/i2p/router/StatisticsManager.java +++ b/router/java/src/net/i2p/router/StatisticsManager.java @@ -87,14 +87,9 @@ public class StatisticsManager implements Service { if (_includePeerRankings) { long publishedUptime = _context.router().getUptime(); - boolean commentOutIn074 = RouterVersion.VERSION.equals("0.7.3"); // Don't publish these for first hour - if (publishedUptime > 62*60*1000) { - if (commentOutIn074) - includeThroughput(stats); - else - includeAverageThroughput(stats); - } + if (publishedUptime > 62*60*1000) + includeAverageThroughput(stats); //includeRate("router.invalidMessageTime", stats, new long[] { 10*60*1000 }); //includeRate("router.duplicateMessageId", stats, new long[] { 24*60*60*1000 }); //includeRate("tunnel.duplicateIV", stats, new long[] { 24*60*60*1000 }); @@ -245,27 +240,6 @@ public class StatisticsManager implements Service { stats.setProperty("stat_bandwidthReceiveBps.60m", str); } - private void includeThroughput(Properties stats) { - RateStat sendRate = _context.statManager().getRate("bw.sendRate"); - if (sendRate != null) { - if (_context.router().getUptime() > 60*60*1000) { - Rate r = sendRate.getRate(60*60*1000); - if (r != null) - stats.setProperty("stat_bandwidthSendBps.60m", num(r.getAverageValue()) + ';' + num(r.getExtremeAverageValue()) + ";0;0;"); - } - } - - RateStat recvRate = _context.statManager().getRate("bw.recvRate"); - if (recvRate != null) { - if (_context.router().getUptime() > 60*60*1000) { - Rate r = recvRate.getRate(60*60*1000); - if (r != null) - stats.setProperty("stat_bandwidthReceiveBps.60m", num(r.getAverageValue()) + ';' + num(r.getExtremeAverageValue()) + ";0;0;"); - } - } - } - - private String getPeriod(Rate rate) { return DataHelper.formatDuration(rate.getPeriod()); } private final String num(double num) { -- GitLab