Package jetbrains.buildServer.diagnostic
Class ThreadTrace
- java.lang.Object
-
- jetbrains.buildServer.diagnostic.ThreadTrace
-
public class ThreadTrace extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(jetbrains.buildServer.diagnostic.ThreadTrace.TraceListener traceListener)voiddiscardTrace()voidenableTraceRecording()Enables trace recording for the current threadstatic ThreadTracegetInstance()StringgetTraceNameForThread(String threadName)voidpersistTrace(String comment, long persistThresholdMillis, String traceName)Persists recorded trace on disk and stops recording.voidpersistTrace(String comment, 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 String comment, @NotNull 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 String comment, long persistThresholdMillis, @NotNull 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)
-
-