jutil
Class Profiler

java.lang.Object
  extended by jutil.Profiler

public class Profiler
extends java.lang.Object

The class contains primitive utilities for profiling method calls. They are primitive because they count all time elapsed, not just the time consumed by the thread running the method call.


Field Summary
private static long startTime
          The timer
 
Constructor Summary
Profiler()
           
 
Method Summary
static void start()
          same as start but with no message.
static void start(java.lang.String msg)
          Call this method just before the method call you want to time.
static void stop()
          Same as start with no message.
static void stop(java.lang.String msg)
          Call this method immediately after the method call.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

startTime

private static long startTime
The timer

Constructor Detail

Profiler

public Profiler()
Method Detail

start

public static void start(java.lang.String msg)
Call this method just before the method call you want to time.

Parameters:
msg - A message to display when timer starts

start

public static void start()
same as start but with no message.


stop

public static void stop(java.lang.String msg)
Call this method immediately after the method call. It displays the elapsed time.

Parameters:
msg - An additional message to display

stop

public static void stop()
Same as start with no message.