cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject cassandra git commit: Print CAS stats in nodetool proxyhistograms
Date Wed, 06 Apr 2016 13:01:15 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk ce747b850 -> 83f4e6102


Print CAS stats in nodetool proxyhistograms

patch by Christopher Batey; reviewed by yukim for CASSANDRA-11507


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/83f4e610
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/83f4e610
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/83f4e610

Branch: refs/heads/trunk
Commit: 83f4e61027d3c6f4f3eb5f7f05c2bcb7e521089c
Parents: ce747b8
Author: Christopher Batey <christopher.batey@gmail.com>
Authored: Tue Apr 5 17:33:34 2016 +0100
Committer: Yuki Morishita <yukim@apache.org>
Committed: Tue Apr 5 18:24:36 2016 -0500

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../tools/nodetool/ProxyHistograms.java         | 22 +++++++++++++-------
 2 files changed, 15 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/83f4e610/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 05fda52..3db6b3f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.6
+ * Print CAS stats in nodetool proxyhistograms (CASSANDRA-11507)
  * More user friendly error when providing an invalid token to nodetool (CASSANDRA-9348)
  * Add static column support to SASI index (CASSANDRA-11183)
  * Support EQ/PREFIX queries in SASI CONTAINS mode without tokenization (CASSANDRA-11434)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83f4e610/src/java/org/apache/cassandra/tools/nodetool/ProxyHistograms.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/nodetool/ProxyHistograms.java b/src/java/org/apache/cassandra/tools/nodetool/ProxyHistograms.java
index 2a2851d..656e7ed 100644
--- a/src/java/org/apache/cassandra/tools/nodetool/ProxyHistograms.java
+++ b/src/java/org/apache/cassandra/tools/nodetool/ProxyHistograms.java
@@ -29,24 +29,30 @@ public class ProxyHistograms extends NodeToolCmd
     @Override
     public void execute(NodeProbe probe)
     {
-        String[] percentiles = new String[]{"50%", "75%", "95%", "98%", "99%", "Min", "Max"};
+        String[] percentiles = {"50%", "75%", "95%", "98%", "99%", "Min", "Max"};
         double[] readLatency = probe.metricPercentilesAsArray(probe.getProxyMetric("Read"));
         double[] writeLatency = probe.metricPercentilesAsArray(probe.getProxyMetric("Write"));
         double[] rangeLatency = probe.metricPercentilesAsArray(probe.getProxyMetric("RangeSlice"));
+        double[] casReadLatency = probe.metricPercentilesAsArray(probe.getProxyMetric("CASRead"));
+        double[] casWriteLatency = probe.metricPercentilesAsArray(probe.getProxyMetric("CASWrite"));
+        double[] viewWriteLatency = probe.metricPercentilesAsArray(probe.getProxyMetric("ViewWrite"));
 
         System.out.println("proxy histograms");
-        System.out.println(format("%-10s%18s%18s%18s",
-                "Percentile", "Read Latency", "Write Latency", "Range Latency"));
-        System.out.println(format("%-10s%18s%18s%18s",
-                "", "(micros)", "(micros)", "(micros)"));
+        System.out.println(format("%-10s%19s%19s%19s%19s%19s%19s",
+                "Percentile", "Read Latency", "Write Latency", "Range Latency", "CAS Read
Latency", "CAS Write Latency", "View Write Latency"));
+        System.out.println(format("%-10s%19s%19s%19s%19s%19s%19s",
+                "", "(micros)", "(micros)", "(micros)", "(micros)", "(micros)", "(micros)"));
         for (int i = 0; i < percentiles.length; i++)
         {
-            System.out.println(format("%-10s%18.2f%18.2f%18.2f",
+            System.out.println(format("%-10s%19.2f%19.2f%19.2f%19.2f%19.2f%19.2f",
                     percentiles[i],
                     readLatency[i],
                     writeLatency[i],
-                    rangeLatency[i]));
+                    rangeLatency[i],
+                    casReadLatency[i],
+                    casWriteLatency[i],
+                    viewWriteLatency[i]));
         }
         System.out.println();
     }
-}
\ No newline at end of file
+}


Mime
View raw message