Package jetbrains.buildServer.diagnostic
Class ThreadTrace
- java.lang.Object
-
- jetbrains.buildServer.diagnostic.ThreadTrace
-
public class ThreadTrace extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(jetbrains.buildServer.diagnostic.ThreadTrace.TraceListener traceListener)
void
discardTrace()
void
enableTraceRecording()
Enables trace recording for the current threadstatic ThreadTrace
getInstance()
java.lang.String
getTraceNameForThread(java.lang.String threadName)
void
persistTrace(java.lang.String comment, long persistThresholdMillis, java.lang.String traceName)
Persists recorded trace on disk and stops recording.void
persistTrace(java.lang.String comment, java.lang.String traceName)
Persists recorded trace on disk and stops recording.
-
-
-
Method Detail
-
getInstance
@NotNull public static ThreadTrace getInstance()
-
enableTraceRecording
public void enableTraceRecording()
Enables trace recording for the current thread
-
persistTrace
public void persistTrace(@NotNull java.lang.String comment, @NotNull java.lang.String traceName)
Persists recorded trace on disk and stops recording. Persisting is only done if trace duration exceeds configured time, seeThreadTracePersistingConfig#getPersistThresholdMillis()
, otherwise trace is discarded.- Parameters:
comment
- comment to save to the trace filetraceName
- name of the trace (will be saved to the trace file name)
-
persistTrace
public void persistTrace(@NotNull java.lang.String comment, long persistThresholdMillis, @NotNull java.lang.String traceName)
Persists recorded trace on disk and stops recording. Persisting is done only if trace duration exceeds specified duration threshold, otherwise trace is discarded.- Parameters:
comment
- comment to save to the trace filetraceName
- name of the trace (will be saved to the trace file name)persistThresholdMillis
- trace duration threshold
-
discardTrace
public void discardTrace()
-
addListener
public void addListener(@NotNull jetbrains.buildServer.diagnostic.ThreadTrace.TraceListener traceListener)
-
getTraceNameForThread
@Nullable public java.lang.String getTraceNameForThread(@NotNull java.lang.String threadName)
-
-