Add session export/import to jfr-shell #40
Draft
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
Implements complete session state export/import functionality for jfr-shell, enabling users to:
Changes
New Features
Session Export: Save complete session state to JSON file
--include-results)--max-rows)Session Import: Restore previously exported sessions
--remap-path)--alias)Implementation
SessionSnapshot.java- Immutable data model for session state (~200 lines)SessionExporter.java- Export service with JSON serialization (~400 lines)SessionImporter.java- Import service with JSON parsing (~500 lines)SessionExportImportTest.java- Integration tests (2 tests, all passing)Commands
Integration
help export,help import)Documentation
Test plan
Testing checklist
Tested scenarios:
--include-resultsoption--aliasoption--remap-pathfor different file locationExample usage
Future enhancements (Phase 2)
Notes
🤖 Generated with Claude Code