This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch feature/CAMEL-23870-heap-histogram
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 06119e092897aa63b9a202488ff1b8ff4281d5ff
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Jul 1 16:26:19 2026 +0200

    chore: update heap histogram F1 help text and MCP description
    
    Co-Authored-By: Claude <[email protected]>
    Signed-off-by: Claus Ibsen <[email protected]>
---
 .../dsl/jbang/core/commands/tui/HeapHistogramTab.java     | 15 +++++++++++++--
 .../camel/dsl/jbang/core/commands/tui/McpFacade.java      |  2 +-
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git 
a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/HeapHistogramTab.java
 
b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/HeapHistogramTab.java
index 13ef05e0b230..1ceec94648a1 100644
--- 
a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/HeapHistogramTab.java
+++ 
b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/HeapHistogramTab.java
@@ -381,12 +381,15 @@ class HeapHistogramTab implements MonitorTab {
                 - **INSTANCES** — Number of live instances of this class on 
the heap
                 - **BYTES** — Total bytes consumed by all instances of this 
class
 
+                The title bar shows total classes, instances, and bytes for 
the current filter.
+
                 ## Detail Panel
 
                 The detail panel below the table shows additional context for 
the selected class:
 
+                - **Class** — Full class name, package, instance count and 
bytes
                 - **Package Summary** — Total classes, instances, and bytes 
for all classes in the same package
-                - **JAR** — The Maven artifact (groupId:artifactId:version) 
and file path of the JAR containing the class
+                - **JAR** — The Maven artifact (groupId:artifactId:version) 
and file path of the JAR containing the class. JDK classes show "JDK (built-in)"
 
                 ## Filter Modes
 
@@ -394,12 +397,20 @@ class HeapHistogramTab implements MonitorTab {
                 - **non-jdk** — Exclude JDK classes (java.*, javax.*, jdk.*, 
sun.*, com.sun.*, arrays)
                 - **camel** — Show only classes from `org.apache.camel` 
packages
 
+                ## What To Look For
+
+                - **Large byte counts at the top**: Normal for byte arrays and 
char arrays — these back Strings and buffers
+                - **Unexpected classes with high counts**: May indicate a 
memory leak
+                - **Growing instance counts on refresh**: Press F5 repeatedly 
to spot classes whose counts keep growing
+                - **Package summary**: Use the detail panel to see total 
memory for an entire package
+                - **JAR origin**: Identify which dependency owns the 
memory-heavy classes
+
                 ## Keys
 
                 | Key | Action |
                 |-----|--------|
                 | Up/Down | Select class |
-                | s | Cycle sort column (bytes, instances, className) |
+                | s | Cycle sort column (className, instances, bytes) |
                 | S | Reverse sort order |
                 | f | Toggle filter (all / non-jdk / camel) |
                 | F5 | Refresh heap histogram |
diff --git 
a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/McpFacade.java
 
b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/McpFacade.java
index dcf7e153c0d8..11096df9a093 100644
--- 
a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/McpFacade.java
+++ 
b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/McpFacade.java
@@ -112,7 +112,7 @@ class McpFacade {
             Map.entry("Consumers", "Consumer statistics (polling and 
event-driven consumers)"),
             Map.entry("DataSource", "JDBC DataSource pool statistics (active, 
idle, max connections)"),
             Map.entry("Heap Histogram",
-                    "Class-level heap memory analysis showing instance counts 
and byte usage per class"),
+                    "Class-level heap memory analysis showing instance counts, 
byte usage, package summary, and JAR origin per class"),
             Map.entry("Inflight", "Currently in-flight exchanges being 
processed"),
             Map.entry("Memory", "JVM memory usage (heap/non-heap), GC stats, 
and thread counts"),
             Map.entry("Metrics", "Micrometer metrics (counters, gauges, 
timers, distribution summaries)"),

Reply via email to