Router: create router.integratedPeers (floodfills) stat, and allow graphing of it.

This commit is contained in:
dg2-new
2015-03-13 16:53:08 +00:00
parent 0494266649
commit 521eb2d8f8
2 changed files with 8 additions and 0 deletions

View File

@@ -1,3 +1,7 @@
2015-03-13 dg
* Router: create router.integratedPeers (floodfills) stat, and
allow graphing of it.
2015-03-08 zzz
* i2psnark: Increase min and default bandwidth
* Throttle: Tweak messages during probabalistic rejection

View File

@@ -38,6 +38,7 @@ public class CoalesceStatsEvent implements SimpleTimer.TimedEvent {
ctx.statManager().createRequiredRateStat("router.highCapacityPeers", "How many high capacity peers we know", "Throttle", new long[] { 5*60*1000, 60*60*1000 });
ctx.statManager().createRateStat("router.activeSendPeers", "How many peers we've sent to this minute", "Throttle", new long[] { 60*1000, 5*60*1000, 60*60*1000 });
ctx.statManager().createRequiredRateStat("router.fastPeers", _x("Known fast peers"), "Throttle", new long[] { 5*60*1000, 60*60*1000 });
ctx.statManager().createRateStat("router.integratedPeers", _x("Known integrated (floodfill) peers"), "Throttle", new long[] { 60*1000, 5*60*1000, 60*60*1000 });
_maxMemory = Runtime.getRuntime().maxMemory();
String legend = "(Bytes)";
if (_maxMemory < Long.MAX_VALUE)
@@ -61,6 +62,9 @@ public class CoalesceStatsEvent implements SimpleTimer.TimedEvent {
int highCap = getContext().profileOrganizer().countHighCapacityPeers();
getContext().statManager().addRateData("router.highCapacityPeers", highCap, 60*1000);
int integrated = getContext().peerManager().getPeersByCapability('f').size();
getContext().statManager().addRateData("router.integratedPeers", integrated, 60*1000);
getContext().statManager().addRateData("bw.sendRate", (long)getContext().bandwidthLimiter().getSendBps());
getContext().statManager().addRateData("bw.recvRate", (long)getContext().bandwidthLimiter().getReceiveBps());