## visad.util
Class Trace

    java.lang.Object
      visad.util.Trace

public class Trace
extends 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
`Trace()`

Method Summary
`static void` `call1(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(String msg, 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(String msg)` Bracket a block of code with call1("some unique msg"); ...code...; call2("some unique msg");
`static void` `call2(String msg, String extra)` Close the call
`static void` `main(String[] args)`
`static void` `msg(String msg)` Print out a line
`static void` `startTrace()` Call this to start tracing

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Trace

    public Trace()

Method Detail

### main

    public static void main(String[] args)

### call1

    public static void call1(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(String msg,
                             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

### call2

    public static void call2(String msg)

  Bracket a block of code with call1("some unique msg"); ...code...; call2("some unique msg");

### call2

    public static void call2(String msg,
                             String extra)

  Close the call

### msg

    public static void msg(String msg)

  Print out a line