cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject git commit: Revert metrics upgrade from stress. Patch by Mikhail Stepura, reviewed by brandonwilliams for CASSANDRA-6153
Date Tue, 08 Oct 2013 18:38:44 GMT
Updated Branches:
  refs/heads/trunk c8434acf7 -> a8a2ffb97


Revert metrics upgrade from stress.
Patch by Mikhail Stepura, reviewed by brandonwilliams for CASSANDRA-6153


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

Branch: refs/heads/trunk
Commit: a8a2ffb976f124e55576bac37cfb73e3bea92b4d
Parents: c8434ac
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Tue Oct 8 13:37:36 2013 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Tue Oct 8 13:37:36 2013 -0500

----------------------------------------------------------------------
 .../src/org/apache/cassandra/stress/StressAction.java  |  4 +---
 .../org/apache/cassandra/stress/StressStatistics.java  | 13 +++----------
 2 files changed, 4 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a8a2ffb9/tools/stress/src/org/apache/cassandra/stress/StressAction.java
----------------------------------------------------------------------
diff --git a/tools/stress/src/org/apache/cassandra/stress/StressAction.java b/tools/stress/src/org/apache/cassandra/stress/StressAction.java
index 46005a1..7098d0b 100644
--- a/tools/stress/src/org/apache/cassandra/stress/StressAction.java
+++ b/tools/stress/src/org/apache/cassandra/stress/StressAction.java
@@ -140,9 +140,7 @@ public class StressAction extends Thread
                                              total,
                                              opDelta / interval,
                                              keyDelta / interval,
-                                             StressStatistics.nanosToMillis(latency.getMedian()),

-                                             StressStatistics.nanosToMillis(latency.get95thPercentile()),

-                                             StressStatistics.nanosToMillis(latency.get999thPercentile()),
+                                             latency.getMedian(), latency.get95thPercentile(),
latency.get999thPercentile(),
                                              currentTimeInSeconds));
 
                 if (client.outputStatistics()) {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a8a2ffb9/tools/stress/src/org/apache/cassandra/stress/StressStatistics.java
----------------------------------------------------------------------
diff --git a/tools/stress/src/org/apache/cassandra/stress/StressStatistics.java b/tools/stress/src/org/apache/cassandra/stress/StressStatistics.java
index 2f7d72d..b739c8e 100644
--- a/tools/stress/src/org/apache/cassandra/stress/StressStatistics.java
+++ b/tools/stress/src/org/apache/cassandra/stress/StressStatistics.java
@@ -19,7 +19,6 @@
 package org.apache.cassandra.stress;
 
 import java.io.PrintStream;
-
 import org.apache.commons.lang3.time.DurationFormatUtils;
 
 import com.yammer.metrics.stats.Snapshot;
@@ -30,7 +29,6 @@ import com.yammer.metrics.stats.Snapshot;
  */
 public class StressStatistics
 {
-    private static final double NANOS_PER_MILLI = 1_000_000.0;
     
     private Session client;
     private PrintStream output;
@@ -95,11 +93,11 @@ public class StressStatistics
                 tallyOpRateCount += 1;
                 tallyKeyRateSum += intervalKeyRate;
                 tallyKeyRateCount += 1;
-                tallyLatencySum += nanosToMillis(latency.getMedian());
+                tallyLatencySum += latency.getMedian();
                 tallyLatencyCount += 1;
-                tally95thLatencySum += nanosToMillis(latency.get95thPercentile());
+                tally95thLatencySum += latency.get95thPercentile();
                 tally95thLatencyCount += 1;
-                tally999thLatencySum += nanosToMillis(latency.get999thPercentile());
+                tally999thLatencySum += latency.get999thPercentile();
                 tally999thLatencyCount += 1;
             }
         durationInSeconds = currentTimeInSeconds;
@@ -124,10 +122,5 @@ public class StressStatistics
         output.println("Total operation time      : " + DurationFormatUtils.formatDuration(
             durationInSeconds*1000, "HH:mm:ss", true));
     }
-    
-    public static double nanosToMillis(double nanos)
-    {
-        return nanos / NANOS_PER_MILLI;
-    }
 
 }


Mime
View raw message