Class DotSerializer
- java.lang.Object
-
- org.openjdk.jmc.flightrecorder.serializers.dot.DotSerializer
-
public final class DotSerializer extends Object
Converts aStacktraceGraphModelto DOT format text. This format can, for example, be used by d3-graphviz, to visualize the graphs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDotSerializer.ConfigurationKey
-
Constructor Summary
Constructors Constructor Description DotSerializer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Map<DotSerializer.ConfigurationKey,String>getDefaultConfiguration()static voidmain(String[] args)Generates a DOT file for the execution sample (CPU profiling) events available in the recording.static StringtoDot(StacktraceGraphModel model, int maxNodesRendered, Map<DotSerializer.ConfigurationKey,String> configuration)Renders aStacktraceGraphModelin DOT format.
-
-
-
Method Detail
-
toDot
public static String toDot(StacktraceGraphModel model, int maxNodesRendered, Map<DotSerializer.ConfigurationKey,String> configuration)
Renders aStacktraceGraphModelin DOT format.
-
getDefaultConfiguration
public static Map<DotSerializer.ConfigurationKey,String> getDefaultConfiguration()
- Returns:
- an example configuration for the dot files, using the defaults.
-
main
public static void main(String[] args) throws IOException, CouldNotLoadRecordingException
Generates a DOT file for the execution sample (CPU profiling) events available in the recording.TODO: This could easily be made highly configurable to allow the user to configure which event type to filter for, what attribute to use for weight, and what frame separator to use.
- Parameters:
args- takes one argument - the file name of the JFR file to serialize into DOT.- Throws:
IOExceptionCouldNotLoadRecordingException
-
-