|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.util.perf.AbstractPerformanceMonitor
public abstract class AbstractPerformanceMonitor
An instance of this class keeps track of timings of method calls made against a named entity. Logging can occur either after each recorded time, or only on VM shutdown or both.
Logging output is managed down to either the entity or entity-invocation level as follows:
performance.summary.method performance.summary.vm AND performance.targetEntityName performance.targetEntityName.methodName
The following examples illustrate how it can be used:
performance.summary.method=DEBUG performance.myBean=DEBUG --> Output method invocation statistic on each call to myBean performance.summary.vm=DEBUG performance.myBean.doSomething=DEBUG --> Output summary for doSomething() invocations on myBean when VM terminates performance=DEBUG --> Output all performance data - after each invocation and upon VM closure
Constructor Summary | |
---|---|
AbstractPerformanceMonitor(java.lang.String entityName)
|
Method Summary | |
---|---|
static boolean |
isDebugEnabled()
Convenience method to check if there is some sort of performance logging enabled |
protected void |
recordStats(java.lang.String methodName,
double delayMs)
Dumps the results of the method execution to: DEBUG output if the method level debug logging is active Performance store if required |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractPerformanceMonitor(java.lang.String entityName)
entityName
- the name of the entity for which the performance is being recordedMethod Detail |
---|
public static boolean isDebugEnabled()
protected void recordStats(java.lang.String methodName, double delayMs)
methodName
- the name of the method against which to store the resultsdelayMs
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |