From ddbeda738e10765e6c6ef51d8e8320d9a200841d Mon Sep 17 00:00:00 2001 From: orbiter Date: Thu, 9 Mar 2006 11:31:17 +0000 Subject: [PATCH] added minimum age of word in cache to performance menu git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1866 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/PerformanceQueues_p.html | 7 +++++++ htroot/PerformanceQueues_p.java | 1 + source/de/anomic/plasma/plasmaWordIndex.java | 4 ++++ source/de/anomic/plasma/plasmaWordIndexCache.java | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/htroot/PerformanceQueues_p.html b/htroot/PerformanceQueues_p.html index 51df4bc59..cc15c3d05 100644 --- a/htroot/PerformanceQueues_p.html +++ b/htroot/PerformanceQueues_p.html @@ -93,6 +93,13 @@ Changes take effect immediately This is the maximum age of a word index that is in the RAM cache in minutes. + + Minimum Age of Word in cache: + #[minAgeOfWordCache]# + + This is the minimum age of a word index that is in the RAM cache in minutes. + + Maximum number of Word Caches, low limit: diff --git a/htroot/PerformanceQueues_p.java b/htroot/PerformanceQueues_p.java index dafe81f37..de43f806d 100644 --- a/htroot/PerformanceQueues_p.java +++ b/htroot/PerformanceQueues_p.java @@ -254,6 +254,7 @@ public class PerformanceQueues_p { prop.put("wordCacheRAMSize", switchboard.wordIndex.wordCacheRAMSize()); prop.put("maxURLinWordCache", "" + switchboard.wordIndex.maxURLinWordCache()); prop.put("maxAgeOfWordCache", "" + (switchboard.wordIndex.maxAgeOfWordCache() / 1000 / 60)); // minutes + prop.put("minAgeOfWordCache", "" + (switchboard.wordIndex.minAgeOfWordCache() / 1000 / 60)); // minutes prop.put("maxWaitingWordFlush", switchboard.getConfig("maxWaitingWordFlush", "180")); prop.put("wordCacheMaxLow", switchboard.getConfig("wordCacheMaxLow", "10000")); prop.put("wordCacheMaxHigh", switchboard.getConfig("wordCacheMaxHigh", "10000")); diff --git a/source/de/anomic/plasma/plasmaWordIndex.java b/source/de/anomic/plasma/plasmaWordIndex.java index 3dad23f5b..74c1a6617 100644 --- a/source/de/anomic/plasma/plasmaWordIndex.java +++ b/source/de/anomic/plasma/plasmaWordIndex.java @@ -94,6 +94,10 @@ public final class plasmaWordIndex { return ramCache.maxURLinWordCache(); } + public long minAgeOfWordCache() { + return ramCache.minAgeOfWordCache(); + } + public long maxAgeOfWordCache() { return ramCache.maxAgeOfWordCache(); } diff --git a/source/de/anomic/plasma/plasmaWordIndexCache.java b/source/de/anomic/plasma/plasmaWordIndexCache.java index 3a4f98306..bda1e8d71 100644 --- a/source/de/anomic/plasma/plasmaWordIndexCache.java +++ b/source/de/anomic/plasma/plasmaWordIndexCache.java @@ -210,6 +210,10 @@ public final class plasmaWordIndexCache implements plasmaWordIndexInterface { return hashScore.getMaxScore(); } + public long minAgeOfWordCache() { + return System.currentTimeMillis() - longEmit(hashDate.getMaxScore()); + } + public long maxAgeOfWordCache() { return System.currentTimeMillis() - longEmit(hashDate.getMinScore()); }