*)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 final long MB = 1024 * KB;
private static Map defaultSettings = null; private static Map defaultSettings = null;
private static long[] slt,chk; private static int[] slt,chk;
private static String[] ost; private static String[] ost;
private static long req, usd, bst, god; private static long req, usd, bst, god;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -170,22 +170,22 @@ public final class yacySeedDB {
} catch (IOException e) {} } catch (IOException e) {}
} }
public long[] dbCacheNodeChunkSize() { public int[] dbCacheNodeChunkSize() {
long[] ac = seedActiveDB.cacheNodeChunkSize(); int[] ac = seedActiveDB.cacheNodeChunkSize();
long[] pa = seedPassiveDB.cacheNodeChunkSize(); int[] pa = seedPassiveDB.cacheNodeChunkSize();
long[] po = seedPotentialDB.cacheNodeChunkSize(); int[] po = seedPotentialDB.cacheNodeChunkSize();
long[] i = new long[3]; 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_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_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; i[kelondroRecords.CP_HIGH] = (ac[kelondroRecords.CP_HIGH] + pa[kelondroRecords.CP_HIGH] + po[kelondroRecords.CP_HIGH]) / 3;
return i; return i;
} }
public long[] dbCacheNodeFillStatus() { public int[] dbCacheNodeFillStatus() {
long[] ac = seedActiveDB.cacheNodeFillStatus(); int[] ac = seedActiveDB.cacheNodeFillStatus();
long[] pa = seedPassiveDB.cacheNodeFillStatus(); int[] pa = seedPassiveDB.cacheNodeFillStatus();
long[] po = seedPotentialDB.cacheNodeFillStatus(); int[] 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]}; 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() { public String[] dbCacheObjectStatus() {

Loading…
Cancel
Save