Class StacktraceTestToolkit
java.lang.Object
org.openjdk.jmc.flightrecorder.test.util.StacktraceTestToolkit
Utility for presenting aggregates stack traces in textual form.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the aggregated stack traces from an item collection as a list of strings.Get lines, including empty lines represented by empty string.getStacktracesBaseline(IOResourceSet resourceSet) static FileReturn the directory where the stacktrace baseline files reside.static IOResourceSet[]Return the files that can be used for comparing old printouts.static voidprintStacktraces(File sourceFile, File destinationFile) Prints the aggregated stacktraces from of a recording to another file in text format.
-
Constructor Details
-
StacktraceTestToolkit
public StacktraceTestToolkit()
-
-
Method Details
-
getTestResources
Return the files that can be used for comparing old printouts.- Returns:
- the test file need for comparing files.
- Throws:
IOException- if the files could not be located.
-
getStacktracesDirectory
Return the directory where the stacktrace baseline files reside.- Returns:
- the printout file directory
- Throws:
IOException- if the directory could not be found
-
printStacktraces
public static void printStacktraces(File sourceFile, File destinationFile) throws IOException, CouldNotLoadRecordingException Prints the aggregated stacktraces from of a recording to another file in text format.- Parameters:
sourceFile- the source recording filedestinationFile- the destination file for the printing.- Throws:
IOExceptionCouldNotLoadRecordingException
-
getStacktracesBaseline
public static List<String> getStacktracesBaseline(IOResourceSet resourceSet) throws IOException, Exception - Throws:
IOExceptionException
-
getLines
Get lines, including empty lines represented by empty string. -
getAggregatedStacktraceLines
Gets the aggregated stack traces from an item collection as a list of strings.- Parameters:
items- the item collection- Returns:
- a list of strings representing the aggregated stack traces
-