com.sun.enterprise.util
Class Profiler

java.lang.Object
  extended by 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
static void beginItem()
          Start timing an item.
static void beginItem(String desc)
          Start timing an item.
static void endItem()
          Stop timing of the latest item
static void main(String[] notUsed)
           
static String report()
          return a String report of all the timings
static void reset()
          Reset the global ProfilerImpl instance.
static void subItem(String desc)
          Convenience method to avoid endItem() beginItem() bracketing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 -


Copyright © 2012 GlassFish Community. All Rights Reserved.