From 1f8408f4177e7f94cd361eda3a2bb0581e0c853e Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Sun, 31 May 2015 14:03:39 +0000 Subject: [PATCH] Stats: Reduce number of rates in required stats to save memory --- .../net/i2p/router/tasks/CoalesceStatsEvent.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/router/java/src/net/i2p/router/tasks/CoalesceStatsEvent.java b/router/java/src/net/i2p/router/tasks/CoalesceStatsEvent.java index c6e620957a..95f5c84698 100644 --- a/router/java/src/net/i2p/router/tasks/CoalesceStatsEvent.java +++ b/router/java/src/net/i2p/router/tasks/CoalesceStatsEvent.java @@ -32,14 +32,14 @@ public class CoalesceStatsEvent implements SimpleTimer.TimedEvent { // Please keep relatively short so it will fit on the graphs. ctx.statManager().createRequiredRateStat("bw.receiveBps", _x("Message receive rate (bytes/sec)"), "Bandwidth", new long[] { 60*1000, 5*60*1000, 60*60*1000 }); ctx.statManager().createRequiredRateStat("bw.sendBps", _x("Message send rate (bytes/sec)"), "Bandwidth", new long[] { 60*1000, 5*60*1000, 60*60*1000 }); - ctx.statManager().createRequiredRateStat("bw.sendRate", _x("Low-level send rate (bytes/sec)"), "Bandwidth", new long[] { 60*1000l, 5*60*1000l, 10*60*1000l, 60*60*1000l }); - ctx.statManager().createRequiredRateStat("bw.recvRate", _x("Low-level receive rate (bytes/sec)"), "Bandwidth", new long[] { 60*1000l, 5*60*1000l, 10*60*1000l, 60*60*1000l }); - ctx.statManager().createRequiredRateStat("router.activePeers", _x("How many peers we are actively talking with"), "Throttle", new long[] { 60*1000, 5*60*1000, 60*60*1000 }); - 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 }); - ctx.statManager().createRequiredRateStat("router.tunnelBacklog", _x("Size of tunnel acceptor backlog"), "Tunnels", new long[] { 60*1000, 5*60*1000, 60*60*1000 }); + ctx.statManager().createRequiredRateStat("bw.sendRate", _x("Low-level send rate (bytes/sec)"), "Bandwidth", new long[] { 60*1000l, 5*60*1000l, 60*60*1000l }); + ctx.statManager().createRequiredRateStat("bw.recvRate", _x("Low-level receive rate (bytes/sec)"), "Bandwidth", new long[] { 60*1000l, 5*60*1000l, 60*60*1000l }); + ctx.statManager().createRequiredRateStat("router.activePeers", _x("How many peers we are actively talking with"), "Throttle", new long[] { 60*1000 }); + ctx.statManager().createRequiredRateStat("router.highCapacityPeers", "How many high capacity peers we know", "Throttle", new long[] { 60*1000 }); + ctx.statManager().createRateStat("router.activeSendPeers", "How many peers we've sent to this minute", "Throttle", new long[] { 60*1000 }); + ctx.statManager().createRequiredRateStat("router.fastPeers", _x("Known fast peers"), "Throttle", new long[] { 60*1000 }); + ctx.statManager().createRateStat("router.integratedPeers", _x("Known integrated (floodfill) peers"), "Throttle", new long[] { 60*1000 }); + ctx.statManager().createRequiredRateStat("router.tunnelBacklog", _x("Size of tunnel acceptor backlog"), "Tunnels", new long[] { 60*60*1000 }); _maxMemory = Runtime.getRuntime().maxMemory(); String legend = "(Bytes)"; if (_maxMemory < Long.MAX_VALUE) -- GitLab