mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
Merged HEAD (5.1) to 5.1.N (5.1.1)
120082 bhorje: ACE-4845 added definition retrieval transaction enforcement and denial of unauthenticated virtualization git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.1.N/root@120200 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -136,23 +136,23 @@ public class Reference
|
||||
}
|
||||
}
|
||||
|
||||
// Average reference length DEBUG trace
|
||||
// Average reference length log trace
|
||||
|
||||
private static long _debug_refLength = 0;
|
||||
private static long _trace_refLength = 0;
|
||||
|
||||
private static long _debug_refCount = 0;
|
||||
private static long _trace_refCount = 0;
|
||||
|
||||
private static final long _debug_refBatchSize = 256;
|
||||
private static final long _trace_refBatchSize = 4096*2;
|
||||
|
||||
private static synchronized void debug_avg_ref_length(long refLength)
|
||||
private static synchronized void _trace_avg_ref_length(long refLength)
|
||||
{
|
||||
_debug_refLength += refLength;
|
||||
_debug_refCount++;
|
||||
if (_debug_refBatchSize > 0 && _debug_refCount % _debug_refBatchSize == 0)
|
||||
_trace_refLength += refLength;
|
||||
_trace_refCount++;
|
||||
if (_trace_refBatchSize > 0 && _trace_refCount % _trace_refBatchSize == 0)
|
||||
{
|
||||
logger.debug("Average reference encoding size : " + (_debug_refLength / _debug_refCount));
|
||||
_debug_refCount = 0;
|
||||
_debug_refLength = 0;
|
||||
logger.trace("Average reference encoding size : " + (_trace_refLength / _trace_refCount));
|
||||
_trace_refCount = 0;
|
||||
_trace_refLength = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -281,9 +281,9 @@ public class Reference
|
||||
NodeRef theNode = new NodeRef(storeRef,
|
||||
idBuilder.toString());
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
if (logger.isTraceEnabled())
|
||||
{
|
||||
debug_avg_ref_length(theNode.toString().length());
|
||||
_trace_avg_ref_length(theNode.toString().length());
|
||||
}
|
||||
|
||||
return theNode;
|
||||
|
Reference in New Issue
Block a user