|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 void
disableProfiler()
Globally disable the profiler.
static void
dump()
Method that dumps the main aggregator (root).
static void
enableProfiler(com.ibm.commons.util.profiler.HighResolutionTimer timer)
Globally enable the profiler.
static void
endProfileBlock(ProfilerAggregator aggregator,
long startTime)
Method that should be called at the end of a profiled block.
static void
endProfiler()
static void
endProfiler(boolean started)
Profiler end.
static long
getCurrentTime()
Get the current time in micros.
static com.ibm.commons.util.profiler.HighResolutionTimer
getCurrentTimer()
Get the current timer.
static ProfilerAggregator
getMainAggregator()
Method that returns the main aggregator (root).
static boolean
isEnabled()
Check if the profiler is enabled for the current thread
static boolean
isStarted()
Check if the profiler is started
static void
profileRunnable(ProfilerType type,
java.lang.String id,
java.lang.Runnable runnable)
Method used to execute and profile a Runnable.
static void
resetProfiler()
Method that should be called to reset the profiler.
static ProfilerAggregator
startProfileBlock(ProfilerType type,
java.lang.String param)
Method that should be called when a block should be profiled.
static ProfilerAggregator
startProfileBlock(ProfilerType type,
java.lang.String param,
int detailLevel)
Method that should be called when a block should be profiled.
static ProfilerAggregator
startProfileBlock(java.lang.String type,
java.lang.String param)
Method that should be called when a block should be profiled.
static boolean
startProfiler()
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
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD