Only count 1000 entities

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2955 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-05-23 14:00:09 +00:00
parent 5b6bff9d97
commit 28a03bfd3d

View File

@@ -166,14 +166,14 @@ public class EhCacheTracerJob implements Job
Element element = cache.get(key);
size += getSize(element);
count++;
if (count >= 1000)
if (count >= 50)
{
break;
}
}
// the size must be multiplied by the ratio of the count to actual size
size = count > 0L ? (long) (size * ((double)keys.size()/(double)count)) : 0L;
size = count > 0 ? (long) ((double)size * ((double)keys.size()/(double)count)) : 0L;
sizeMB = (double)size/1024.0/1024.0;
maxSize = cache.getMaxElementsInMemory();