Package com.sun.enterprise.util
Class Profiler
java.lang.Object
com.sun.enterprise.util.Profiler
A easy-to-use class that wraps one global ProfilerImpl object. Use it to begin
and end profiling in one 'profiling thread'. I.e. use this object to get timing for
sub-operations. Use separate ProfilerImpl objects to get timings for overlapping
profile needs.
WARNING: Call reset at the end to avoid memory leaks.
- Version:
- Author:
- bnevins
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidStart timing an item.static voidStart timing an item.static voidendItem()Stop timing of the latest itemstatic voidstatic Stringreport()return a String report of all the timingsstatic voidreset()Reset the global ProfilerImpl instance.static voidConvenience method to avoid endItem() beginItem() bracketing
-
Method Details
-
reset
public static void reset()Reset the global ProfilerImpl instance. -
beginItem
public static void beginItem()Start timing an item. -
beginItem
Start timing an item.- Parameters:
desc- - Descriptive text for the item
-
endItem
public static void endItem()Stop timing of the latest item -
report
return a String report of all the timings- Returns:
-
subItem
Convenience method to avoid endItem() beginItem() bracketing- Parameters:
desc- - Descriptive text for the item
-
main
- Parameters:
notUsed-
-