Convert .dat recordings into individual JSON files #191
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds an exporter that reads a .dat file and writes one JSON file per recording to a specified output directory. The JSON shape is designed for readability, diffs, Mermaid conversion, and downstream tooling.
Why
Make recordings easy to share, review, and automate
Enable Mermaid diagram generation from exported JSON
What’s included
Command entry point to export:
Input: a single .dat file or a directory of .dat files
Output: recording-.json files in the chosen directory
Pretty-printed JSON with stable field ordering
Iterative/streaming traversal to avoid large in-memory trees
Usage
Single file → multiple JSONs (one per recording)
ulyp-export
--in /path/to/recording.dat
--out /path/to/out
Example Json Format
{
"recordingId": "0001",
"startTimeEpochMs": 1757186574142,
"durationMs": 842,
"threadName": "http-nio-0.0.0.0-8080-exec-1",
"totalCalls" : 20,
"root": {
"method": "com.example.App#run",
"args": [{"name":"input","type":"String","value":"foo"}],
"return": {"type":"int","value":42},
"thrown": null,
"children": [
{
"method":"com.example.Service#compute",
"args":[{"type":"int","value":7}],
"return":{"type":"int","value":49},
"children":[]
}
]
}
}
Example downstream uses
Generate Mermaid sequence/class diagrams
Text diffs in PRs to spot behavior changes
Grep/jq for hotspot analysis, error patterns, or timing
Feed BI/reporting pipelines or flaky-test triage scripts
Tests
Golden test: small .dat → matches expected.json
No changes to existing runtime behavior
Export runs only when invoked