You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by nk...@apache.org on 2014/02/13 10:09:13 UTC
svn commit: r1567867 -
/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
Author: nkeywal
Date: Thu Feb 13 09:09:13 2014
New Revision: 1567867
URL: http://svn.apache.org/r1567867
Log:
HBASE-10511 Add latency percentiles on PerformanceEvaluation
Modified:
hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java?rev=1567867&r1=1567866&r2=1567867&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java (original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java Thu Feb 13 09:09:13 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());
}
}
}