Class FlameGraphJsonSerializer
- java.lang.Object
-
- org.openjdk.jmc.flightrecorder.serializers.json.FlameGraphJsonSerializer
-
public class FlameGraphJsonSerializer extends Object
Produces a tree model suitable for rendering flame graphs.
-
-
Constructor Summary
Constructors Constructor Description FlameGraphJsonSerializer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidmain(String[] args)Generates a JSON file for the execution sample (CPU profiling) events available in the recording.static StringtoJson(StacktraceTreeModel model)Serializes aStacktraceTreeModelto JSON.
-
-
-
Method Detail
-
toJson
public static String toJson(StacktraceTreeModel model)
Serializes aStacktraceTreeModelto JSON.- Parameters:
model- theStacktraceTreeModelto serialize to JSON.- Returns:
- a String containing the serialized model.
-
main
public static void main(String[] args) throws IOException, CouldNotLoadRecordingException
Generates a JSON 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 JSON.- Throws:
IOExceptionCouldNotLoadRecordingException
-
-