|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.commons.util.profiler.Profiler
public class Profiler
This class is used to enable/disable the profiler.
if( Profiler.enabled ) {
startProfiling(type,param);
try {
// Do stuff...
} finally {
endProfiling();
}
} else {
// Do stuff...
}
Constructor Summary
Profiler()
Method Summary
static voiddisableProfiler()
Globally disable the profiler.
static voiddump()
Method that dumps the main aggregator (root).
static voidenableProfiler(com.ibm.commons.util.profiler.HighResolutionTimer timer)
Globally enable the profiler.
static voidendProfileBlock(ProfilerAggregator aggregator,
long startTime)
Method that should be called at the end of a profiled block.
static voidendProfiler()
static voidendProfiler(boolean started)
Profiler end.
static longgetCurrentTime()
Get the current time in micros.
static com.ibm.commons.util.profiler.HighResolutionTimergetCurrentTimer()
Get the current timer.
static ProfilerAggregatorgetMainAggregator()
Method that returns the main aggregator (root).
static booleanisEnabled()
Check if the profiler is enabled for the current thread
static booleanisStarted()
Check if the profiler is started
static voidprofileRunnable(ProfilerType type,
java.lang.String id,
java.lang.Runnable runnable)
Method used to execute and profile a Runnable.
static voidresetProfiler()
Method that should be called to reset the profiler.
static ProfilerAggregatorstartProfileBlock(ProfilerType type,
java.lang.String param)
Method that should be called when a block should be profiled.
static ProfilerAggregatorstartProfileBlock(ProfilerType type,
java.lang.String param,
int detailLevel)
Method that should be called when a block should be profiled.
static ProfilerAggregatorstartProfileBlock(java.lang.String type,
java.lang.String param)
Method that should be called when a block should be profiled.
static booleanstartProfiler()
Profiler start.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
Profiler
public Profiler()
Method Detail
enableProfiler
public static void enableProfiler(com.ibm.commons.util.profiler.HighResolutionTimer timer)
disableProfiler
public static void disableProfiler()
startProfiler
public static boolean startProfiler()
endProfiler
public static void endProfiler(boolean started)
endProfiler
public static void endProfiler()
isStarted
public static boolean isStarted()
isEnabled
public static boolean isEnabled()
getCurrentTimer
public static com.ibm.commons.util.profiler.HighResolutionTimer getCurrentTimer()
startProfileBlock
public static ProfilerAggregator startProfileBlock(ProfilerType type,
java.lang.String param)
startProfileBlock
public static ProfilerAggregator startProfileBlock(ProfilerType type,
java.lang.String param,
int detailLevel)
startProfileBlock
public static ProfilerAggregator startProfileBlock(java.lang.String type,
java.lang.String param)
endProfileBlock
public static void endProfileBlock(ProfilerAggregator aggregator,
long startTime)
resetProfiler
public static void resetProfiler()
getMainAggregator
public static ProfilerAggregator getMainAggregator()
dump
public static void dump()
profileRunnable
public static void profileRunnable(ProfilerType type,
java.lang.String id,
java.lang.Runnable runnable)
getCurrentTime
public static long getCurrentTime()
Overview
Package
Class
Tree
Serialized
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD