From 194d42b6a717ea49527530f3b2d1b6782ce69802 Mon Sep 17 00:00:00 2001 From: auron_x Date: Mon, 30 Oct 2006 19:04:06 +0000 Subject: [PATCH] *) changed PPM-calculation to be more accurate git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2884 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaSwitchboard.java | 4 ++++ source/de/anomic/yacy/yacyPeerActions.java | 14 +++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) 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 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); }