org.eigenbase.trace
Class EigenbaseTimingTracer

java.lang.Object
  extended by org.eigenbase.trace.EigenbaseTimingTracer

public class EigenbaseTimingTracer
extends Object

EigenbaseTimingTracer provides a mechanism for tracing the timing of a call sequence at nanosecond resolution.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/trace/EigenbaseTimingTracer.java#6 $
Author:
John V. Sichi

Field Summary
private static DecimalFormat decimalFormat
           
private  long lastNanoTime
           
private  Logger logger
           
 
Constructor Summary
EigenbaseTimingTracer(Logger logger, String startEvent)
          Creates a new timing tracer, publishing an initial event (at elapsed time 0).
 
Method Summary
 void traceTime(String event)
          Publishes an event with the time elapsed since the previous event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

decimalFormat

private static final DecimalFormat decimalFormat

logger

private final Logger logger

lastNanoTime

private long lastNanoTime
Constructor Detail

EigenbaseTimingTracer

public EigenbaseTimingTracer(Logger logger,
                             String startEvent)
Creates a new timing tracer, publishing an initial event (at elapsed time 0).

Parameters:
logger - logger on which to log timing events; level FINE will be used
startEvent - event to trace as start of timing
Method Detail

traceTime

public void traceTime(String event)
Publishes an event with the time elapsed since the previous event.

Parameters:
event - event to trace