fix for wrong memory display

see http://www.yacy-forum.de/viewtopic.php?p=35239#35239

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3673 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 18 years ago
parent d6480dc670
commit dca85b82ff

@ -84,7 +84,7 @@
<td align="left" class="TableCellDark">#[tableIndexPath]#</td>
<td align="right">#[tableIndexChunkSize]#</td>
<td align="right">#[tableIndexCount]#</td>
<td align="right">#[tableIndexMem]# MB</td>
<td align="right">#[tableIndexMem]#</td>
</tr>
#{/TableList}#
<tr class="TableCellDark">
@ -111,7 +111,7 @@
<td align="left" class="TableCellDark">#[nodeCachePath]#</td>
<td align="right">#[nodeChunkSize]#</td>
<td align="right">#[nodeCacheCount]#</td>
<td align="right">#[nodeCacheMem]# MB</td>
<td align="right">#[nodeCacheMem]#</td>
<td align="right">#[nodeCacheReadHit]#</td>
<td align="right">#[nodeCacheReadMiss]#</td>
<td align="right">#[nodeCacheWriteUnique]#</td>
@ -158,7 +158,7 @@
<td align="left" class="TableCellDark">#[objectCachePath]#</td>
<td align="right">#[objectHitChunkSize]#</td>
<td align="right">#[objectHitCacheCount]#</td>
<td align="right">#[objectHitCacheMem]# MB</td>
<td align="right">#[objectHitCacheMem]#</td>
<td align="right">#[objectHitCacheReadHit]#</td>
<td align="right">#[objectHitCacheReadMiss]#</td>
<td align="right">#[objectHitCacheWriteUnique]#</td>
@ -167,7 +167,7 @@
<td align="right">#[objectHitCacheFlushes]#</td>
<td align="right">#[objectMissChunkSize]#</td>
<td align="right">#[objectMissCacheCount]#</td>
<td align="right">#[objectMissCacheMem]# MB</td>
<td align="right">#[objectMissCacheMem]#</td>
<td align="right">#[objectMissCacheReadHit]#</td>
<td align="right">#[objectMissCacheReadMiss]#</td>
<td align="right">#[objectMissCacheWriteUnique]#</td>

@ -129,7 +129,7 @@ public class PerformanceMemory_p {
prop.put("TableList_" + c + "_tableIndexPath", ((p = filename.indexOf("DATA")) < 0) ? filename : filename.substring(p));
prop.put("TableList_" + c + "_tableIndexChunkSize", map.get("tableIndexChunkSize"));
prop.put("TableList_" + c + "_tableIndexCount", map.get("tableIndexCount"));
prop.put("TableList_" + c + "_tableIndexMem", map.get("tableIndexCount"));
prop.put("TableList_" + c + "_tableIndexMem", memstr(mem));
c++;
}
prop.put("TableList", c);
@ -147,7 +147,7 @@ public class PerformanceMemory_p {
prop.put("NodeList_" + c + "_nodeCachePath", ((p = filename.indexOf("DATA")) < 0) ? filename : filename.substring(p));
prop.put("NodeList_" + c + "_nodeChunkSize", map.get("nodeChunkSize"));
prop.put("NodeList_" + c + "_nodeCacheCount", map.get("nodeCacheCount"));
prop.put("NodeList_" + c + "_nodeCacheMem", mem / (1024 * 1024));
prop.put("NodeList_" + c + "_nodeCacheMem", memstr(mem));
prop.put("NodeList_" + c + "_nodeCacheReadHit", map.get("nodeCacheReadHit"));
prop.put("NodeList_" + c + "_nodeCacheReadMiss", map.get("nodeCacheReadMiss"));
prop.put("NodeList_" + c + "_nodeCacheWriteUnique", map.get("nodeCacheWriteUnique"));
@ -175,7 +175,7 @@ public class PerformanceMemory_p {
totalhitmem += hitmem;
prop.put("ObjectList_" + c + "_objectHitChunkSize", map.get("objectHitChunkSize"));
prop.put("ObjectList_" + c + "_objectHitCacheCount", map.get("objectHitCacheCount"));
prop.put("ObjectList_" + c + "_objectHitCacheMem", hitmem / (1024 * 1024));
prop.put("ObjectList_" + c + "_objectHitCacheMem", memstr(hitmem));
prop.put("ObjectList_" + c + "_objectHitCacheReadHit", map.get("objectHitCacheReadHit"));
prop.put("ObjectList_" + c + "_objectHitCacheReadMiss", map.get("objectHitCacheReadMiss"));
prop.put("ObjectList_" + c + "_objectHitCacheWriteUnique", map.get("objectHitCacheWriteUnique"));
@ -188,7 +188,7 @@ public class PerformanceMemory_p {
totalmissmem += missmem;
prop.put("ObjectList_" + c + "_objectMissChunkSize", map.get("objectMissChunkSize"));
prop.put("ObjectList_" + c + "_objectMissCacheCount", map.get("objectMissCacheCount"));
prop.put("ObjectList_" + c + "_objectMissCacheMem", missmem / (1024 * 1024));
prop.put("ObjectList_" + c + "_objectMissCacheMem", memstr(missmem));
prop.put("ObjectList_" + c + "_objectMissCacheReadHit", map.get("objectMissCacheReadHit"));
prop.put("ObjectList_" + c + "_objectMissCacheReadMiss", map.get("objectMissCacheReadMiss"));
prop.put("ObjectList_" + c + "_objectMissCacheWriteUnique", map.get("objectMissCacheWriteUnique"));
@ -220,4 +220,8 @@ public class PerformanceMemory_p {
// return rewrite values for templates
return prop;
}
private static final String memstr(long mem) {
return (mem == 0) ? "-" : ((mem < 1024*1024) ? ((mem / 1024) + " KB") : (mem / (1024 * 1024) + " MB"));
}
}

Loading…
Cancel
Save