Author: toad
Date: 2008-07-25 21:56:58 +0000 (Fri, 25 Jul 2008)
New Revision: 21401
Modified:
branches/db4o/freenet/src/freenet/clients/http/StatisticsToadlet.java
Log:
Show store checker jobs. Always 0 in my experience, but it eliminates a theory.
Modified: branches/db4o/freenet/src/freenet/clients/http/StatisticsToadlet.java
===================================================================
--- branches/db4o/freenet/src/freenet/clients/http/StatisticsToadlet.java
2008-07-25 21:56:14 UTC (rev 21400)
+++ branches/db4o/freenet/src/freenet/clients/http/StatisticsToadlet.java
2008-07-25 21:56:58 UTC (rev 21401)
@@ -313,6 +313,9 @@
HTMLNode databaseJobsInfobox =
nextTableCell.addChild("div", "class", "infobox");
drawDatabaseJobsBox(databaseJobsInfobox);
+
+ HTMLNode storeCheckerJobsInfobox =
nextTableCell.addChild("div", "class", "infobox");
+ drawStoreCheckerJobsBox(storeCheckerJobsInfobox);
// peer distribution box
overviewTableRow = overviewTable.addChild("tr");
@@ -435,6 +438,24 @@
}
}
+ private void drawStoreCheckerJobsBox(HTMLNode node) {
+ node.addChild("div", "class", "infobox-header",
l10n("storeJobsByPriority"));
+ HTMLNode threadsInfoboxContent = node.addChild("div", "class",
"infobox-content");
+ int[] jobsByPriority =
core.datastoreCheckerExecutor.runningJobs();
+
+ HTMLNode threadsByPriorityTable =
threadsInfoboxContent.addChild("table", "border", "0");
+ HTMLNode row = threadsByPriorityTable.addChild("tr");
+
+ row.addChild("th", l10n("priority"));
+ row.addChild("th", l10n("waiting"));
+
+ for(int i=0; i<jobsByPriority.length; i++) {
+ row = threadsByPriorityTable.addChild("tr");
+ row.addChild("td", String.valueOf(i));
+ row.addChild("td", String.valueOf(jobsByPriority[i]));
+ }
+ }
+
private void drawStoreSizeBox(HTMLNode storeSizeInfobox, long
nodeUptimeSeconds) {
storeSizeInfobox.addChild("div", "class", "infobox-header",
"Datastore");