hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [1/2] hbase git commit: HBASE-17731 Fractional latency reporting in MultiThreadedAction
Date Fri, 10 Mar 2017 00:58:21 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 1105e1260 -> 0bc9ad062
  refs/heads/master 26928ff91 -> 7da0feea8


HBASE-17731 Fractional latency reporting in MultiThreadedAction


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

Branch: refs/heads/master
Commit: 7da0feea8dd4236b520bf48b2a84c52bf2910e56
Parents: 26928ff
Author: Andrew Purtell <apurtell@apache.org>
Authored: Thu Mar 9 16:54:23 2017 -0800
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Thu Mar 9 16:54:23 2017 -0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/util/MultiThreadedAction.java    | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/7da0feea/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedAction.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedAction.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedAction.java
index 8da92b2..2b68719 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedAction.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedAction.java
@@ -215,11 +215,13 @@ public abstract class MultiThreadedAction {
               + ", time="
               + formatTime(time)
               + ((numKeys > 0 && time > 0) ? (" Overall: [" + "keys/s= "
-                  + numKeys * 1000 / time + ", latency=" + totalOpTime
-                  / numKeys + " ms]") : "")
+                  + numKeys * 1000 / time + ", latency="
+                  + String.format("%.2f", (double)totalOpTime / (double)numKeys)
+                  + " ms]") : "")
               + ((numKeysDelta > 0) ? (" Current: [" + "keys/s="
                   + numKeysDelta * 1000 / REPORTING_INTERVAL_MS + ", latency="
-                  + totalOpTimeDelta / numKeysDelta + " ms]") : "")
+                  + String.format("%.2f", (double)totalOpTimeDelta / (double)numKeysDelta)
+                  + " ms]") : "")
               + progressInfo());
 
           if (streamingCounters) {


Mime
View raw message