Author: nextgens
Date: 2008-08-13 16:32:37 +0000 (Wed, 13 Aug 2008)
New Revision: 21819

Modified:
   trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java
   trunk/freenet/src/freenet/support/io/TempBucketFactory.java
Log:
Display how much memory the RAMBuckets take on the statistic toadlet

Modified: trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java       
2008-08-13 16:23:04 UTC (rev 21818)
+++ trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java       
2008-08-13 16:32:37 UTC (rev 21819)
@@ -992,6 +992,7 @@
                overviewList.addChild("li", "backedOffPercent:\u00a0" + 
fix3p1pct.format(backedOffPercent));
                overviewList.addChild("li", "pInstantReject:\u00a0" + 
fix3p1pct.format(stats.pRejectIncomingInstantly()));
                overviewList.addChild("li", "unclaimedFIFOSize:\u00a0" + 
node.getUnclaimedFIFOSize());
+               overviewList.addChild("li", "RAMBucketPoolSize:\u00a0" + 
SizeUtil.formatSize(core.tempBucketFactory.getRamUsed())+ " / "+ 
SizeUtil.formatSize(core.tempBucketFactory.getMaxRamUsed()));
                overviewList.addChild("li", "uptimeAverage:\u00a0" + 
fix3p1pct.format(node.uptime.getUptime()));

        }

Modified: trunk/freenet/src/freenet/support/io/TempBucketFactory.java
===================================================================
--- trunk/freenet/src/freenet/support/io/TempBucketFactory.java 2008-08-13 
16:23:04 UTC (rev 21818)
+++ trunk/freenet/src/freenet/support/io/TempBucketFactory.java 2008-08-13 
16:32:37 UTC (rev 21819)
@@ -71,6 +71,10 @@
                bytesInUse -= size;
        }

+       public synchronized long getRamUsed() {
+               return bytesInUse;
+       }
+       
        public synchronized void setMaxRamUsed(long size) {
                maxRamUsed = size;
        }


Reply via email to