Documentation of 'visad.util.Trace' Java class
Trace
visad.util

Class Trace



  • public class Trace
    extends java.lang.Object
    This class provides a hook into the IDV Trace facility. It uses reflection to call the corresponding ucar.unidata.util.Trace methods if that class can be found. Else, nothing happens. To use this first call: Trace.startTrace();

    You can bracket a code segment with:

      Trace.call1("some label");
      ... code
      Trace.call2("some label");
     
    This matches the "some label". It will indent subsequent Trace calls to show nesting. You can also just print something out with:
     Trace.msg("some message");
     
    The output looks like:
     196  996   >ImageRenderer type.doTransform
     11   99      >ImageRenderer build texture length: 4503200
     2    15        >ImageRenderer new byte
     691  15683     <ImageRenderer new byte ms: 690
     1    1         >ImageRenderer color_bytes
     345  99        <ImageRenderer color_bytes ms: 344
     0    2       <ImageRenderer build texture ms: 1037
     
    The first column is the elapsed time since the last print line. The second column is the memory delta (note: GC can make this negative). For the call1/call2 pairs the ms:... shows the time spent in the block.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Trace() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static void call1(java.lang.String msg)
      Bracket a block of code with call1("some unique msg"); ...code...; call2("some unique msg"); Where "some unique msg" is used to match up the call1/call2 pairs
      static void call1(java.lang.String msg, java.lang.String extra)
      Bracket a block of code with call1("some unique msg"); ...code...; call2("some unique msg"); Append extra to the end of the line
      static void call2(java.lang.String msg)
      Bracket a block of code with call1("some unique msg"); ...code...; call2("some unique msg");
      static void call2(java.lang.String msg, java.lang.String extra)
      Close the call
      static void main(java.lang.String[] args) 
      static void msg(java.lang.String msg)
      Print out a line
      static void startTrace()
      Call this to start tracing
      static void stopTrace()
      Call this to start tracing
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Trace

        public Trace()
    • Method Detail

      • main

        public static void main(java.lang.String[] args)
      • call1

        public static void call1(java.lang.String msg)
        Bracket a block of code with call1("some unique msg"); ...code...; call2("some unique msg"); Where "some unique msg" is used to match up the call1/call2 pairs
      • call1

        public static void call1(java.lang.String msg,
                                 java.lang.String extra)
        Bracket a block of code with call1("some unique msg"); ...code...; call2("some unique msg"); Append extra to the end of the line
      • startTrace

        public static void startTrace()
        Call this to start tracing
      • stopTrace

        public static void stopTrace()
        Call this to start tracing
      • call2

        public static void call2(java.lang.String msg)
        Bracket a block of code with call1("some unique msg"); ...code...; call2("some unique msg");
      • call2

        public static void call2(java.lang.String msg,
                                 java.lang.String extra)
        Close the call
      • msg

        public static void msg(java.lang.String msg)
        Print out a line

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.