public class Trace extends Object
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: 1037The 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 and Description |
---|
Trace() |
Modifier and Type | Method and Description |
---|---|
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
|
static void |
stopTrace()
Call this to start tracing
|
public static void main(String[] args)
public static void call1(String msg)
public static void call1(String msg, String extra)
public static void startTrace()
public static void stopTrace()
public static void call2(String msg)
public static void msg(String msg)
Copyright © 1996–2023 The SSEC Visualization Project. All rights reserved.