davsclaus opened a new pull request, #24364:
URL: https://github.com/apache/camel/pull/24364

   ## Summary
   
   - Add a new **HeapHistogramDevConsole** that invokes 
`DiagnosticCommandMBean.gcClassHistogram` to get class-level heap memory usage
   - Add a **Heap Histogram TUI tab** (More > H) with table + detail panel 
showing package summary and JAR origin for the selected class
   - Add a **CLI command** `camel cmd heap-histogram` with sort/filter/top 
options and `--watch` support
   - Add a **MCP tool** `camel_runtime_heap_histogram` for `camel ask` AI agent 
queries
   - Use `Locale.US` consistently across TUI for number formatting
   
   ## Details
   
   The Heap Histogram tab provides `jcmd GC.class_histogram`-equivalent 
functionality integrated into the Camel developer experience:
   
   - **Table**: Shows rank, class name, instance count, and bytes 
(human-readable KB/MB/GB)
   - **Detail panel**: For the selected class, shows package-level aggregation 
(total classes/instances/bytes in the same package) and the JAR origin (Maven 
GAV + path), resolved from classpath data
   - **Filters**: all / non-jdk / camel
   - **Sort**: by className, instances, or bytes (default: bytes descending)
   - **Refresh**: F5 to reload the histogram
   
   ### Files changed
   
   | File | Change |
   |------|--------|
   | `HeapHistogramDevConsole.java` | New dev console |
   | `LocalCliConnector.java` | Action handler |
   | `HeapHistogramTab.java` | New TUI tab with detail panel |
   | `TabRegistry.java` | Register tab |
   | `PopupManager.java` | Popup entry + shortcut |
   | `McpFacade.java` | Tab name + description |
   | `CamelHeapHistogram.java` | New CLI command |
   | `CamelJBangMain.java` | Subcommand registration |
   | `RuntimeTools.java` | New MCP tool |
   
   ## Test plan
   
   - [x] Build passes (`mvn install -DskipTests`)
   - [ ] Run a Camel app, open TUI, navigate to More > Heap Histogram
   - [ ] Verify table shows class data with correct totals
   - [ ] Verify detail panel shows package summary and JAR origin
   - [ ] Verify filters (all/non-jdk/camel) work and totals update
   - [ ] Verify `camel cmd heap-histogram` CLI output
   - [ ] Verify `camel ask "show heap histogram"` uses the MCP tool
   
   _Claude Code on behalf of Claus Ibsen_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   Co-Authored-By: Claude <[email protected]>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to