Package jetbrains.buildServer.diagnostic
Class ThreadDumpSaver
- java.lang.Object
-
- jetbrains.buildServer.diagnostic.ThreadDumpSaver
-
public class ThreadDumpSaver extends Object
Created by Andrey Titov on 12.01.16.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ThreadDumpSaver()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description File
doSaveDump(String fileSuffix, String summary)
File
doSaveDump(String fileSuffix, String fileHeader, String logDescription)
File
doSaveDump(String fileSuffix, String fileHeader, String additionalInfo, String logDescription)
Try save dump to a file.static ThreadDumpSaver
getInstance()
To be used only from static context, consider using bean instead
-
-
-
Method Detail
-
getInstance
@NotNull public static ThreadDumpSaver getInstance()
To be used only from static context, consider using bean instead
-
doSaveDump
@Nullable public File doSaveDump(@NotNull String fileSuffix, @NotNull String fileHeader, @NotNull String logDescription)
-
doSaveDump
@Nullable public File doSaveDump(@NotNull String fileSuffix, @NotNull String fileHeader, @NotNull String additionalInfo, @NotNull String logDescription)
Try save dump to a file. File location and base name is retrieved from current ThreadDumpSaverContext. If the file couldn't be saved an error message will be shown in the log. The format of the thread dump file: <fileHeader> <Server info including version, licensing, java options and some database info> <additionalInfo> <All threads currently alive> <Memory and CPU usage>- Parameters:
fileSuffix
- A source ID for this thread dump, eg: 'periodical', 'manual', 'longRequest', ... Is added to the end of the filename. Default value is 'threadDump' if empty.fileHeader
- Short description for the thread dump to be shown in the very beginning of the file - before server info. Should be short and informative. Won't be added if empty.additionalInfo
- Any additional info to be added between the server info block and the thread dumplogDescription
- Thread dump description to be shown in the log in case of error- Returns:
- File if it was created or null otherwise
-
-