public final class AnalysisResult
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
long |
analysisDurationMs
Total time spent analyzing the heap.
|
java.lang.String |
className
Class name of the object that leaked if
leakFound is true, null otherwise. |
boolean |
excludedLeak
True if
leakFound is true and the only path to the leaking reference is
through excluded references. |
java.lang.Throwable |
failure
Null unless the analysis failed.
|
boolean |
leakFound
True if a leak was found in the heap dump.
|
LeakTrace |
leakTrace
Shortest path to GC roots for the leaking object if
leakFound is true, null
otherwise. |
long |
retainedHeapSize
The number of bytes which would be freed if all references to the leaking object were
released.
|
| Modifier and Type | Method and Description |
|---|---|
static AnalysisResult |
failure(java.lang.Throwable failure,
long analysisDurationMs) |
static AnalysisResult |
leakDetected(boolean excludedLeak,
java.lang.String className,
LeakTrace leakTrace,
long retainedHeapSize,
long analysisDurationMs) |
static AnalysisResult |
noLeak(long analysisDurationMs) |
public final boolean leakFound
public final boolean excludedLeak
leakFound is true and the only path to the leaking reference is
through excluded references. Usually, that means you can safely ignore this report.public final java.lang.String className
leakFound is true, null otherwise.
The class name format is the same as what would be returned by Class.getName().public final LeakTrace leakTrace
leakFound is true, null
otherwise. This can be used as a unique signature for the leak.public final java.lang.Throwable failure
public final long retainedHeapSize
leakFound is false.public final long analysisDurationMs
public static AnalysisResult noLeak(long analysisDurationMs)
public static AnalysisResult leakDetected(boolean excludedLeak, java.lang.String className, LeakTrace leakTrace, long retainedHeapSize, long analysisDurationMs)
public static AnalysisResult failure(java.lang.Throwable failure, long analysisDurationMs)