Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

*) changed PPM-calculation to be more accurate

auron_x194d42b6a717
diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java
index 2b243237f..a63e35392 100644
--- a/source/de/anomic/plasma/plasmaSwitchboard.java
+++ b/source/de/anomic/plasma/plasmaSwitchboard.java
@@ -1724,6 +1724,10 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
}
storageEndTime = System.currentTimeMillis();
+ //increment number of indexed urls
+ long indexedurls = getConfigLong("indexedc",0) + 1;
+ setConfig("indexedc",indexedurls);
+
if (log.isInfo()) {
// TODO: UTF-8 docDescription seems not to be displayed correctly because
// of string concatenation
diff --git a/source/de/anomic/yacy/yacyPeerActions.java b/source/de/anomic/yacy/yacyPeerActions.java
index f09107cad..219169f8e 100644
--- a/source/de/anomic/yacy/yacyPeerActions.java
+++ b/source/de/anomic/yacy/yacyPeerActions.java
@@ -109,15 +109,11 @@ public class yacyPeerActions {
seedDB.mySeed.put(yacySeed.PORT, Integer.toString(serverCore.getPortNr(sb.getConfig("port", "8080"))));
}
- long uptime = ((System.currentTimeMillis() - Long.parseLong(sb.getConfig("startupTime", "0"))) / 1000);
- long uptimediff = uptime - Long.parseLong(sb.getConfig("lastseedcheckUptime", "0")); //TODO: Do not use the switchboard?
- int indexing_cluster = Integer.parseInt(sb.getConfig("80_indexing_cluster", "1"));
- if (indexing_cluster < 1) indexing_cluster = 1;
- long indexedc = 0;
- for(int i=0;i<indexing_cluster;++i)
- indexedc += sb.getThread((80+i)+"_indexing").getBusyCycles();
- long indexedcdiff = indexedc - Long.parseLong(sb.getConfig("lastseedcheckIndexedc", "0"));
- if( uptimediff > 300 || ((String)sb.getConfig("lastseedcheckUptime", "-1")).equals("-1") ){
+ long uptime = ((System.currentTimeMillis() - sb.getConfigLong("startupTime", 0)) / 1000);
+ long uptimediff = uptime - sb.getConfigLong("lastseedcheckUptime", 0); //TODO: Do not use the switchboard?
+ long indexedc = sb.getConfigLong("indexedc",0);
+ long indexedcdiff = indexedc - sb.getConfigLong("lastseedcheckIndexedc", 0);
+ if( uptimediff > 300 || sb.getConfigLong("lastseedcheckUptime", -1) == -1 ){
sb.setConfig("lastseedcheckUptime", uptime);
sb.setConfig("lastseedcheckIndexedc", indexedc);
}