- fixed a display problem in watch crawler

- another small enhancement in balancer

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5729 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 16 years ago
parent b3f75e48fa
commit 61f9dbf0cc

@ -21,16 +21,11 @@ public class status_p {
prop.setLocalized(false);
prop.put("rejected", "0");
sb.updateMySeed();
final int cacheSize = sb.webIndex.index().getBufferSize();
final long cacheMaxSize = sb.getConfigLong(plasmaSwitchboardConstants.WORDCACHE_MAX_COUNT, 10000);
final int cacheMaxSize = (int) sb.getConfigLong(plasmaSwitchboardConstants.WORDCACHE_MAX_COUNT, 10000);
prop.putNum("ppm", sb.currentPPM());
prop.putNum("qpm", sb.webIndex.peers().mySeed().getQPM());
prop.putNum("wordCacheSize", sb.webIndex.index().getBufferSize());
prop.putNum("wordCacheSize", cacheSize);
prop.putNum("wordCacheMaxSize", cacheMaxSize);
prop.put("wordCacheCount", cacheSize);
prop.put("wordCacheMaxCount", cacheMaxSize);
prop.put("wordCacheSize", Integer.toString(sb.webIndex.index().getBufferSize()));
prop.put("wordCacheMaxSize", Integer.toString(cacheMaxSize));
//
// memory usage and system attributes
prop.putNum("freeMemory", MemoryControl.free());

@ -2,9 +2,7 @@
<status>
<ppm>#[ppm]#</ppm>
<wordCacheSize>#[wordCacheSize]#</wordCacheSize>
<wordCacheSize>#[wordCacheSize]#</wordCacheSize>
<wordCacheCount>#[wordCacheCount]#</wordCacheCount>
<wordCacheMaxCount>#[wordCacheMaxCount]#</wordCacheMaxCount>
<wordCacheMaxSize>#[wordCacheMaxSize]#</wordCacheMaxSize>
<memory>
<free>#[freeMemory]#</free>

@ -91,9 +91,7 @@ function handleStatus(){
removeAllChildren(trafCrawlerSpan);
trafCrawlerSpan.appendChild(document.createTextNode(Math.round((trafficCrawler) / 1024 / 10.24) / 100));
var wordCache=getValue(getFirstChild(statusTag, "wordCacheCount"));
var wordCacheSize=getValue(getFirstChild(statusTag, "wordCacheSize"));
var wordCacheMax=getValue(getFirstChild(statusTag, "wordCacheMaxCount"));
var wordCacheMaxSize=getValue(getFirstChild(statusTag, "wordCacheMaxSize"));
wordCacheNum=document.getElementById("wordcacheNum");
@ -103,7 +101,7 @@ function handleStatus(){
wordCacheSpan=document.getElementById("wordcacheSpan");
removeAllChildren(wordCacheSpan);
var img;
var percent=Math.round(wordCache/wordCacheMax*100);
var percent=Math.round(wordCacheSize/wordCacheMaxSize*100);
for(i=0;i<percent*WORDCACHEBAR_LENGTH;i++){
img=document.createElement("img");
img.setAttribute("src", BAR_IMG2);

@ -580,10 +580,12 @@ public class Balancer {
// behave in a DoS-manner
Log.logInfo("BALANCER", "forcing crawl-delay of " + sleeptime + " milliseconds for " + crawlEntry.url().getHost() + ((sleeptime > Math.max(minimumLocalDelta, minimumGlobalDelta)) ? " (caused by robots.txt)" : ""));
if (System.currentTimeMillis() - this.lastPrepare > 10000) {
prepare(100);
long t = System.currentTimeMillis();
prepare(400);
this.lastPrepare = System.currentTimeMillis();
sleeptime -= this.lastPrepare - t;
}
try {synchronized(this) { this.wait(sleeptime); }} catch (final InterruptedException e) {}
if (sleeptime > 0) try {synchronized(this) { this.wait(sleeptime); }} catch (final InterruptedException e) {}
}
// update statistical data

Loading…
Cancel
Save