mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
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:
@@ -166,14 +166,14 @@ public class EhCacheTracerJob implements Job
|
|||||||
Element element = cache.get(key);
|
Element element = cache.get(key);
|
||||||
size += getSize(element);
|
size += getSize(element);
|
||||||
count++;
|
count++;
|
||||||
if (count >= 1000)
|
if (count >= 50)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// the size must be multiplied by the ratio of the count to actual size
|
// 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;
|
sizeMB = (double)size/1024.0/1024.0;
|
||||||
maxSize = cache.getMaxElementsInMemory();
|
maxSize = cache.getMaxElementsInMemory();
|
||||||
|
Reference in New Issue
Block a user