hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject svn commit: r1568177 - in /hbase/branches/hbase-10070: ./ hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
Date Fri, 14 Feb 2014 00:58:12 GMT
Author: enis
Date: Fri Feb 14 00:58:11 2014
New Revision: 1568177

URL: http://svn.apache.org/r1568177
Log:
HBASE-10511 Add latency percentiles on PerformanceEvaluation

Modified:
    hbase/branches/hbase-10070/   (props changed)
    hbase/branches/hbase-10070/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java

Propchange: hbase/branches/hbase-10070/
------------------------------------------------------------------------------
  Merged /hbase/trunk:r1567867

Modified: hbase/branches/hbase-10070/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-10070/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java?rev=1568177&r1=1568176&r2=1568177&view=diff
==============================================================================
--- hbase/branches/hbase-10070/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
(original)
+++ hbase/branches/hbase-10070/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
Fri Feb 14 00:58:11 2014
@@ -39,6 +39,7 @@ import java.util.regex.Pattern;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.commons.math.stat.descriptive.DescriptiveStatistics;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.conf.Configured;
 import org.apache.hadoop.fs.FSDataInputStream;
@@ -1120,7 +1121,7 @@ public class PerformanceEvaluation exten
   static class RandomReadTest extends Test {
     private final int everyN;
     private final boolean reportLatency;
-    private final float[] times;
+    private final double[] times;
     int idx = 0;
 
     RandomReadTest(Configuration conf, TestOptions options, Status status) {
@@ -1129,7 +1130,7 @@ public class PerformanceEvaluation exten
       LOG.info("Sampling 1 every " + everyN + " out of " + perClientRunRows + " total rows.");
       this.reportLatency = options.isReportLatency();
       if (this.reportLatency) {
-        times = new float[(int) Math.ceil(this.perClientRunRows * this.sampleRate)];
+        times = new double[(int) Math.ceil(this.perClientRunRows * this.sampleRate)];
       } else {
         times = null;
       }
@@ -1158,7 +1159,20 @@ public class PerformanceEvaluation exten
     protected void testTakedown() throws IOException {
       super.testTakedown();
       if (this.reportLatency) {
-        LOG.info("randomRead latency log (ms): " + Arrays.toString(times));
+        DescriptiveStatistics ds;
+        Arrays.sort(times);
+        ds = new DescriptiveStatistics(times);
+        LOG.info("randomRead latency log (ms), on " + times.length + " measures");
+        LOG.info("99.9999% = " + ds.getPercentile(99.9999d));
+        LOG.info(" 99.999% = " + ds.getPercentile(99.999d));
+        LOG.info("  99.99% = " + ds.getPercentile(99.99d));
+        LOG.info("   99.9% = " + ds.getPercentile(99.9d));
+        LOG.info("     99% = " + ds.getPercentile(99d));
+        LOG.info("     95% = " + ds.getPercentile(95d));
+        LOG.info("     90% = " + ds.getPercentile(90d));
+        LOG.info("     80% = " + ds.getPercentile(80d));
+        LOG.info("Standard Deviation = " + ds.getStandardDeviation());
+        LOG.info("Mean = " + ds.getMean());
       }
     }
   }



Mime
View raw message