Class CalciteTimingTracer


  • public class CalciteTimingTracer
    extends java.lang.Object
    CalciteTimingTracer provides a mechanism for tracing the timing of a call sequence at nanosecond resolution.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.text.DecimalFormat DECIMAL_FORMAT  
      private long lastNanoTime  
      private org.slf4j.Logger logger  
    • Constructor Summary

      Constructors 
      Constructor Description
      CalciteTimingTracer​(org.slf4j.Logger logger, java.lang.String startEvent)
      Creates a new timing tracer, publishing an initial event (at elapsed time 0).
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void traceTime​(java.lang.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

      • DECIMAL_FORMAT

        private static final java.text.DecimalFormat DECIMAL_FORMAT
      • logger

        private final org.slf4j.Logger logger
      • lastNanoTime

        private long lastNanoTime
    • Constructor Detail

      • CalciteTimingTracer

        public CalciteTimingTracer​(org.slf4j.Logger logger,
                                   java.lang.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​(java.lang.String event)
        Publishes an event with the time elapsed since the previous event.
        Parameters:
        event - event to trace