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 Details

    • 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 -