From ff34377ac53ddbc86cf6d81fc2e0d2c496e04b79 Mon Sep 17 00:00:00 2001 From: theli Date: Fri, 24 Feb 2006 08:58:13 +0000 Subject: [PATCH] *) displaying fill level of indexing and loader queue on status page git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1757 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/Status.java | 20 ++++++++++++++------ htroot/Status_p.inc | 30 ++++++++++++++++++++++++++++-- htroot/env/grafics/green_bar.gif | Bin 0 -> 807 bytes htroot/env/grafics/red_bar.gif | Bin 0 -> 807 bytes 4 files changed, 42 insertions(+), 8 deletions(-) create mode 100644 htroot/env/grafics/green_bar.gif create mode 100644 htroot/env/grafics/red_bar.gif diff --git a/htroot/Status.java b/htroot/Status.java index ce1b84f50..a14d40fc3 100644 --- a/htroot/Status.java +++ b/htroot/Status.java @@ -286,12 +286,20 @@ public class Status { // Queue information final plasmaSwitchboard sb = (plasmaSwitchboard)env; - prop.put("indexingQueueSize", Integer.toString(sb.getThread("80_indexing").getJobCount()+sb.indexingTasksInProcess.size())); - prop.put("indexingQueueMax", Integer.toString(plasmaSwitchboard.indexingSlots)); - - prop.put("loaderQueueSize", Integer.toString(sb.cacheLoader.size())); - prop.put("loaderQueueMax", Integer.toString(plasmaSwitchboard.crawlSlots)); - + int indexingJobCount = sb.getThread("80_indexing").getJobCount()+sb.indexingTasksInProcess.size(); + int indexingMaxCount = plasmaSwitchboard.indexingSlots; + int indexingPercent = indexingJobCount*100/indexingMaxCount; + prop.put("indexingQueueSize", Integer.toString(indexingJobCount)); + prop.put("indexingQueueMax", Integer.toString(indexingMaxCount)); + prop.put("indexingQueuePercent",(indexingPercent>100)?"100":Integer.toString(indexingPercent)); + + int loaderJobCount = sb.cacheLoader.size(); + int loaderMaxCount = plasmaSwitchboard.crawlSlots; + int loaderPercent = loaderJobCount*100/loaderMaxCount; + prop.put("loaderQueueSize", Integer.toString(loaderJobCount)); + prop.put("loaderQueueMax", Integer.toString(loaderMaxCount)); + prop.put("loaderQueuePercent", (loaderPercent>100)?"100":Integer.toString(loaderPercent)); + prop.put("localCrawlQueueSize", Integer.toString(sb.getThread(plasmaSwitchboard.CRAWLJOB_LOCAL_CRAWL).getJobCount())); prop.put("localCrawlPaused",sb.crawlJobIsPaused(plasmaSwitchboard.CRAWLJOB_LOCAL_CRAWL)?1:0); diff --git a/htroot/Status_p.inc b/htroot/Status_p.inc index e8e74f3f5..df8ec2ba3 100644 --- a/htroot/Status_p.inc +++ b/htroot/Status_p.inc @@ -66,12 +66,38 @@ Indexing Queue - #[indexingQueueSize]# | #[indexingQueueMax]# + + + + + + +
#[indexingQueueSize]# | #[indexingQueueMax]#  + + + + +
+
+ [Details] Loader Queue - #[loaderQueueSize]# | #[loaderQueueMax]# + + + + + + +
#[loaderQueueSize]# | #[loaderQueueMax]#  + + + + +
+
+ [Details] diff --git a/htroot/env/grafics/green_bar.gif b/htroot/env/grafics/green_bar.gif new file mode 100644 index 0000000000000000000000000000000000000000..e32422dd959c071d057e3c1e71b770ff6724f290 GIT binary patch literal 807 zcma)5J!lkB5dQXV-Cga}CRin4afTQ)77=4{fz2I=DJ+@NUkx8 zR>BEqjO8`KLNr)g1VpedpFrTkaa{~;1MdE(l>h($ literal 0 HcmV?d00001 diff --git a/htroot/env/grafics/red_bar.gif b/htroot/env/grafics/red_bar.gif new file mode 100644 index 0000000000000000000000000000000000000000..21fceb8912f3f482c62c7960a3871dfa60566345 GIT binary patch literal 807 zcma)5O-NKx6#i!B_1?=}wUJf{EhbU>TNK%1gy+amT4;pG)F|}3o5tYG&RJe^HksHe zm|#*{&PH5>it83a1T9orL|G9O2`Liwo%`OiS#}=h-1B$8bI!f@_2shX&y6LJz%Ssz zTf~%2MB3URAb2#{{vle;mTMztPZ$9_RO-I9Z_#gD53QeF%srcwtBn64rD<<2RAuY1 z2NUIn&wc}(ORSZsxAGCs+G}kdz!+HQ)t9h8zdh{lHSMKFRW!GS@uS)dsrbAh z+V94JS-W0jKeefGq%YUyCgZ7;O~XpKWCL749{sq4Q~ZW;hE^|f=%XAUA47m1T(ds) z