public class Coroner
extends java.lang.Object
printReport
. Alternatively, the Coroner can be asked to watch
the JVM and generate a report at a later time - unless the Coroner is cancelled
by that time.
The latter method is useful for printing diagnostics in the event that, for example, a unit test stalls and fails to cancel the Coroner in time. The Coroner will assume that the test has "died" and print a report to aid in debugging.
Modifier and Type | Class and Description |
---|---|
static interface |
Coroner.WatchHandle
Used to cancel the Coroner after calling
watch . |
Constructor and Description |
---|
Coroner() |
Modifier and Type | Method and Description |
---|---|
static scala.concurrent.duration.FiniteDuration |
defaultStartAndStopDuration() |
static void |
printReport(java.lang.String reportTitle,
java.io.PrintStream out)
Print a report containing diagnostic information.
|
static Coroner.WatchHandle |
watch(scala.concurrent.duration.FiniteDuration duration,
java.lang.String reportTitle,
java.io.PrintStream out,
scala.concurrent.duration.FiniteDuration startAndStopDuration,
boolean displayThreadCounts)
Ask the Coroner to print a report if it is not cancelled by the given deadline.
|
public static scala.concurrent.duration.FiniteDuration defaultStartAndStopDuration()
public static Coroner.WatchHandle watch(scala.concurrent.duration.FiniteDuration duration, java.lang.String reportTitle, java.io.PrintStream out, scala.concurrent.duration.FiniteDuration startAndStopDuration, boolean displayThreadCounts)
If displayThreadCounts is set to true, then the Coroner will print thread counts during start and stop.
duration
- (undocumented)reportTitle
- (undocumented)out
- (undocumented)startAndStopDuration
- (undocumented)displayThreadCounts
- (undocumented)public static void printReport(java.lang.String reportTitle, java.io.PrintStream out)
reportTitle
- (undocumented)out
- (undocumented)