*)reverted patch for memory-display issue

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2095 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
auron_x 19 years ago
parent 0c2cbc572b
commit 55ea4cbfe6

@ -63,7 +63,7 @@ public class PerformanceMemory_p {
private static final long MB = 1024 * KB;
private static Map defaultSettings = null;
private static long[] slt,chk;
private static int[] slt,chk;
private static String[] ost;
private static long req, usd, bst, god;

@ -86,11 +86,11 @@ public class blogBoard {
return datbase.size();
}
public long[] dbCacheNodeChunkSize() {
public int[] dbCacheNodeChunkSize() {
return datbase.cacheNodeChunkSize();
}
public long[] dbCacheNodeFillStatus() {
public int[] dbCacheNodeFillStatus() {
return datbase.cacheNodeFillStatus();
}

@ -86,11 +86,11 @@ public class messageBoard {
return database.size();
}
public long[] dbCacheNodeChunkSize() {
public int[] dbCacheNodeChunkSize() {
return database.cacheNodeChunkSize();
}
public long[] dbCacheNodeFillStatus() {
public int[] dbCacheNodeFillStatus() {
return database.cacheNodeFillStatus();
}

@ -91,11 +91,11 @@ public final class userDB {
}
}
public long[] dbCacheNodeChunkSize() {
public int[] dbCacheNodeChunkSize() {
return userTable.cacheNodeChunkSize();
}
public long[] dbCacheNodeFillStatus() {
public int[] dbCacheNodeFillStatus() {
return userTable.cacheNodeFillStatus();
}

@ -100,20 +100,20 @@ public class wikiBoard {
return datbase.size();
}
public long[] dbCacheNodeChunkSize() {
long[] db = datbase.cacheNodeChunkSize();
long[] bk = bkpbase.cacheNodeChunkSize();
long[] i = new long[3];
public int[] dbCacheNodeChunkSize() {
int[] db = datbase.cacheNodeChunkSize();
int[] bk = bkpbase.cacheNodeChunkSize();
int[] i = new int[3];
i[kelondroRecords.CP_LOW] = (db[kelondroRecords.CP_LOW] + bk[kelondroRecords.CP_LOW]) / 2;
i[kelondroRecords.CP_MEDIUM] = (db[kelondroRecords.CP_MEDIUM] + bk[kelondroRecords.CP_MEDIUM]) / 2;
i[kelondroRecords.CP_HIGH] = (db[kelondroRecords.CP_HIGH] + bk[kelondroRecords.CP_HIGH]) / 2;
return i;
}
public long[] dbCacheNodeFillStatus() {
long[] a = datbase.cacheNodeFillStatus();
long[] b = bkpbase.cacheNodeFillStatus();
return new long[]{a[0] + b[0], a[1] + b[1], a[2] + b[2], a[3] + b[3]};
public int[] dbCacheNodeFillStatus() {
int[] a = datbase.cacheNodeFillStatus();
int[] b = bkpbase.cacheNodeFillStatus();
return new int[]{a[0] + b[0], a[1] + b[1], a[2] + b[2], a[3] + b[3]};
}
public String[] dbCacheObjectStatus() {

@ -133,11 +133,11 @@ public class kelondroMap {
return dyn.columnSize(0);
}
public long[] cacheNodeChunkSize() {
public int[] cacheNodeChunkSize() {
return dyn.cacheNodeChunkSize();
}
public long[] cacheNodeFillStatus() {
public int[] cacheNodeFillStatus() {
return dyn.cacheNodeFillStatus();
}

@ -456,21 +456,21 @@ public class kelondroRecords {
return this.headchunksize + element_in_cache + ((cacheControl) ? cache_control_entry : 0);
}
public long[] cacheNodeChunkSize() {
public int[] cacheNodeChunkSize() {
// returns three integers:
// #0: chunk size of CP_LOW - priority entries
// #1: chunk size of CP_MEDIUM - priority entries
// #2: chunk size of CP_HIGH - priority entries
long[] i = new long[3];
int[] i = new int[3];
i[CP_LOW] = cacheNodeChunkSize(false);
i[CP_MEDIUM] = cacheNodeChunkSize(false);
i[CP_HIGH] = cacheNodeChunkSize(this.cacheScore != null);
return i;
}
public long[] cacheNodeFillStatus() {
if (XcacheHeaders == null) return new long[]{0,0,0,0};
return new long[]{XcacheSize - (XcacheHeaders[CP_HIGH].size() + XcacheHeaders[CP_MEDIUM].size() + XcacheHeaders[CP_LOW].size()), XcacheHeaders[CP_HIGH].size(), XcacheHeaders[CP_MEDIUM].size(), XcacheHeaders[CP_LOW].size()};
public int[] cacheNodeFillStatus() {
if (XcacheHeaders == null) return new int[]{0,0,0,0};
return new int[]{XcacheSize - (XcacheHeaders[CP_HIGH].size() + XcacheHeaders[CP_MEDIUM].size() + XcacheHeaders[CP_LOW].size()), XcacheHeaders[CP_HIGH].size(), XcacheHeaders[CP_MEDIUM].size(), XcacheHeaders[CP_LOW].size()};
}
protected Node newNode() throws IOException {

@ -77,11 +77,11 @@ public class plasmaCrawlProfile {
domsCache = new HashMap();
}
public long[] dbCacheNodeChunkSize() {
public int[] dbCacheNodeChunkSize() {
return profileTable.cacheNodeChunkSize();
}
public long[] dbCacheNodeFillStatus() {
public int[] dbCacheNodeFillStatus() {
return profileTable.cacheNodeFillStatus();
}

@ -85,11 +85,11 @@ public class plasmaCrawlRobotsTxt {
}
}
public long[] dbCacheNodeChunkSize() {
public int[] dbCacheNodeChunkSize() {
return robotsTable.cacheNodeChunkSize();
}
public long[] dbCacheNodeFillStatus() {
public int[] dbCacheNodeFillStatus() {
return robotsTable.cacheNodeFillStatus();
}

@ -201,11 +201,11 @@ public final class plasmaHTCache {
return this.responseHeaderDB.size();
}
public long[] dbCacheChunkSize() {
public int[] dbCacheChunkSize() {
return this.responseHeaderDB.cacheNodeChunkSize();
}
public long[] dbCacheFillStatus() {
public int[] dbCacheFillStatus() {
return this.responseHeaderDB.cacheNodeFillStatus();
}

@ -125,11 +125,11 @@ public final class plasmaWordIndex {
return assortmentCluster.sizes();
}
public long[] assortmentsCacheChunkSizeAvg() {
public int[] assortmentsCacheChunkSizeAvg() {
return assortmentCluster.cacheChunkSizeAvg();
}
public long[] assortmentsCacheFillStatusCml() {
public int[] assortmentsCacheFillStatusCml() {
return assortmentCluster.cacheFillStatusCml();
}

@ -261,11 +261,11 @@ public final class plasmaWordIndexAssortment {
return assortments.size();
}
public long[] cacheNodeChunkSize() {
public int[] cacheNodeChunkSize() {
return assortments.cacheNodeChunkSize();
}
public long[] cacheNodeFillStatus() {
public int[] cacheNodeFillStatus() {
return assortments.cacheNodeFillStatus();
}

@ -263,9 +263,9 @@ public final class plasmaWordIndexAssortmentCluster {
return sizes;
}
public long[] cacheChunkSizeAvg() {
public int[] cacheChunkSizeAvg() {
int[] i = new int[]{0, 0, 0};
long[] a = new long[3];
int[] a = new int[3];
for (int j = 0; j < clusterCount; j++) {
a = assortments[j].cacheNodeChunkSize();
i[kelondroRecords.CP_LOW] += a[kelondroRecords.CP_LOW];
@ -278,8 +278,8 @@ public final class plasmaWordIndexAssortmentCluster {
return a;
}
public long[] cacheFillStatusCml() {
long[] a, cml = new long[]{0, 0, 0, 0};
public int[] cacheFillStatusCml() {
int[] a, cml = new int[]{0, 0, 0, 0};
for (int i = 0; i < clusterCount; i++) {
a = assortments[i].cacheNodeFillStatus();
for (int j = 0; j < 4; j++) cml[j] += a[j];

@ -96,11 +96,11 @@ public class yacyNewsDB {
news = createDB(path, bufferkb);
}
public long[] dbCacheNodeChunkSize() {
public int[] dbCacheNodeChunkSize() {
return news.cacheNodeChunkSize();
}
public long[] dbCacheNodeFillStatus() {
public int[] dbCacheNodeFillStatus() {
return news.cacheNodeFillStatus();
}

@ -106,11 +106,11 @@ public class yacyNewsPool {
return newsDB.size();
}
public long[] dbCacheNodeChunkSize() {
public int[] dbCacheNodeChunkSize() {
return newsDB.dbCacheNodeChunkSize();
}
public long[] dbCacheNodeFillStatus() {
public int[] dbCacheNodeFillStatus() {
return newsDB.dbCacheNodeFillStatus();
}

@ -170,22 +170,22 @@ public final class yacySeedDB {
} catch (IOException e) {}
}
public long[] dbCacheNodeChunkSize() {
long[] ac = seedActiveDB.cacheNodeChunkSize();
long[] pa = seedPassiveDB.cacheNodeChunkSize();
long[] po = seedPotentialDB.cacheNodeChunkSize();
long[] i = new long[3];
public int[] dbCacheNodeChunkSize() {
int[] ac = seedActiveDB.cacheNodeChunkSize();
int[] pa = seedPassiveDB.cacheNodeChunkSize();
int[] po = seedPotentialDB.cacheNodeChunkSize();
int[] i = new int[3];
i[kelondroRecords.CP_LOW] = (ac[kelondroRecords.CP_LOW] + pa[kelondroRecords.CP_LOW] + po[kelondroRecords.CP_LOW]) / 3;
i[kelondroRecords.CP_MEDIUM] = (ac[kelondroRecords.CP_MEDIUM] + pa[kelondroRecords.CP_MEDIUM] + po[kelondroRecords.CP_MEDIUM]) / 3;
i[kelondroRecords.CP_HIGH] = (ac[kelondroRecords.CP_HIGH] + pa[kelondroRecords.CP_HIGH] + po[kelondroRecords.CP_HIGH]) / 3;
return i;
}
public long[] dbCacheNodeFillStatus() {
long[] ac = seedActiveDB.cacheNodeFillStatus();
long[] pa = seedPassiveDB.cacheNodeFillStatus();
long[] po = seedPotentialDB.cacheNodeFillStatus();
return new long[]{ac[0] + pa[0] + po[0], ac[1] + pa[1] + po[1], ac[2] + pa[2] + po[2], ac[3] + pa[3] + po[3]};
public int[] dbCacheNodeFillStatus() {
int[] ac = seedActiveDB.cacheNodeFillStatus();
int[] pa = seedPassiveDB.cacheNodeFillStatus();
int[] po = seedPotentialDB.cacheNodeFillStatus();
return new int[]{ac[0] + pa[0] + po[0], ac[1] + pa[1] + po[1], ac[2] + pa[2] + po[2], ac[3] + pa[3] + po[3]};
}
public String[] dbCacheObjectStatus() {

Loading…
Cancel
Save