Package com.sun.enterprise.util
Class Profiler
- java.lang.Object
-
- com.sun.enterprise.util.Profiler
-
public class Profiler extends Object
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
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
beginItem()
Start timing an item.static void
beginItem(String desc)
Start timing an item.static void
endItem()
Stop timing of the latest itemstatic void
main(String[] notUsed)
static String
report()
return a String report of all the timingsstatic void
reset()
Reset the global ProfilerImpl instance.static void
subItem(String desc)
Convenience method to avoid endItem() beginItem() bracketing
-
-
-
Method Detail
-
reset
public static void reset()
Reset the global ProfilerImpl instance.
-
beginItem
public static void beginItem()
Start timing an item.
-
beginItem
public static void beginItem(String desc)
Start timing an item.- Parameters:
desc
- - Descriptive text for the item
-
endItem
public static void endItem()
Stop timing of the latest item
-
report
public static String report()
return a String report of all the timings- Returns:
-
subItem
public static void subItem(String desc)
Convenience method to avoid endItem() beginItem() bracketing- Parameters:
desc
- - Descriptive text for the item
-
main
public static void main(String[] notUsed)
- Parameters:
notUsed
-
-
-