bschoening commented on code in PR #4011:
URL: https://github.com/apache/cassandra/pull/4011#discussion_r2015342139


##########
src/java/org/apache/cassandra/tools/nodetool/stats/GcStatsHolder.java:
##########
@@ -19,20 +19,48 @@
 package org.apache.cassandra.tools.nodetool.stats;
 
 import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.Map;
 
 import org.apache.cassandra.tools.NodeProbe;
 
+import static org.apache.cassandra.io.util.FileUtils.stringifyFileSize;
+
 /**
  * Holds and converts GC statistics to a map structure.
  */
 public class GcStatsHolder implements StatsHolder
 {
-    public final NodeProbe probe;
+    public static final String INTERVAL = "interval_ms";
+    public static final String MAX_GC = "max_gc_elapsed_ms";
+    public static final String TOTAL_GC = "total_gc_elapsed_ms";
+    public static final String STDEV_GC = "stdev_gc_elapsed_ms";
+    public static final String RECLAIMED_GC = "gc_reclaimed_mb";
+    public static final String COLLECTIONS = "collections";

Review Comment:
   Is this GC Count? If so, that would be a more straightforward and clear name 
and imply units.



##########
src/java/org/apache/cassandra/tools/nodetool/stats/GcStatsHolder.java:
##########
@@ -19,20 +19,48 @@
 package org.apache.cassandra.tools.nodetool.stats;
 
 import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.Map;
 
 import org.apache.cassandra.tools.NodeProbe;
 
+import static org.apache.cassandra.io.util.FileUtils.stringifyFileSize;
+
 /**
  * Holds and converts GC statistics to a map structure.
  */
 public class GcStatsHolder implements StatsHolder
 {
-    public final NodeProbe probe;
+    public static final String INTERVAL = "interval_ms";
+    public static final String MAX_GC = "max_gc_elapsed_ms";
+    public static final String TOTAL_GC = "total_gc_elapsed_ms";
+    public static final String STDEV_GC = "stdev_gc_elapsed_ms";
+    public static final String RECLAIMED_GC = "gc_reclaimed_mb";
+    public static final String COLLECTIONS = "collections";
+    public static final String TOTAL_DIRECT_MEMORY = "direct_memory_bytes";

Review Comment:
   Using Total and Max together is confusing.  If direct_memory_bytes is the 
amount currently allocated with malloc(), ALLOCATED_DIRECT_MEMORY might be more 
clear.



##########
src/java/org/apache/cassandra/tools/nodetool/stats/GcStatsHolder.java:
##########
@@ -19,20 +19,48 @@
 package org.apache.cassandra.tools.nodetool.stats;
 
 import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.Map;
 
 import org.apache.cassandra.tools.NodeProbe;
 
+import static org.apache.cassandra.io.util.FileUtils.stringifyFileSize;
+
 /**
  * Holds and converts GC statistics to a map structure.
  */
 public class GcStatsHolder implements StatsHolder
 {
-    public final NodeProbe probe;
+    public static final String INTERVAL = "interval_ms";
+    public static final String MAX_GC = "max_gc_elapsed_ms";
+    public static final String TOTAL_GC = "total_gc_elapsed_ms";
+    public static final String STDEV_GC = "stdev_gc_elapsed_ms";
+    public static final String RECLAIMED_GC = "gc_reclaimed_mb";
+    public static final String COLLECTIONS = "collections";
+    public static final String TOTAL_DIRECT_MEMORY = "direct_memory_bytes";
+    public static final String MAX_DIRECT_MEMORY = "max_direct_memory_bytes";
+    public static final String RESERVED_DIRECT_MEMORY = 
"reserved_direct_memory_bytes";

Review Comment:
   In the sample output, TOTAL_DIRECT and RESERVED_DIRECT are almost the same 
values.  Not sure if that's a anomaly of the test runs or they are actually the 
same.



-- 
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: pr-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to