|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javatools.administrative.Tracer
public class Tracer
This class is part of the Java Tools (see http://mpii.de/yago-naga/javatools). It is licensed under the Creative Commons Attribution License (see http://creativecommons.org/licenses/by/3.0) by the YAGO-NAGA team (see http://mpii.de/yago-naga). This class allows to trace where a program hangs. Use as follows:
Before calling a method in your program, call Tracer.signal(): Tracer.signal("Calling blah"); In your main method, state Tracer.start(number of milliseconds); Whenever the tracer does not receive a signal for the given number of milliseconds, it writes a warning, such as e.g. Calling blah hangs When it receives the next signal, it will say Hang resolvedUse the tracer for debugging purposes only.
Constructor Summary | |
---|---|
Tracer()
|
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
Calls test1 and test2 in a loop. |
static boolean |
signal(java.lang.Object... s)
Send a signal to the tracer. |
static boolean |
start(long millisDelay)
Start the tracer, accept millisDelay milliseconds between two signals before issuing a warning. |
static void |
stop()
Stop the tracer |
static void |
test1()
Sleeps for 2 seconds. |
static void |
test2()
Sleeps for 5 seconds. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Tracer()
Method Detail |
---|
public static boolean start(long millisDelay)
public static void stop()
public static boolean signal(java.lang.Object... s)
public static void test1()
public static void test2()
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |