cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [6/9] git commit: convert sum to double before dividing
Date Thu, 21 Nov 2013 02:58:11 GMT
convert sum to double before dividing


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

Branch: refs/heads/trunk
Commit: ed8117ff9b69511c0c3a715030daa7da004afe86
Parents: 91d56bf
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Wed Nov 20 20:57:27 2013 -0600
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Wed Nov 20 20:57:27 2013 -0600

----------------------------------------------------------------------
 src/java/org/apache/cassandra/utils/BoundedStatsDeque.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ed8117ff/src/java/org/apache/cassandra/utils/BoundedStatsDeque.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/BoundedStatsDeque.java b/src/java/org/apache/cassandra/utils/BoundedStatsDeque.java
index 2491e8d..3983b74 100644
--- a/src/java/org/apache/cassandra/utils/BoundedStatsDeque.java
+++ b/src/java/org/apache/cassandra/utils/BoundedStatsDeque.java
@@ -67,6 +67,6 @@ public class BoundedStatsDeque implements Iterable<Long>
 
     public double mean()
     {
-        return size() > 0 ? sum() / size() : 0;
+        return size() > 0 ? ((double) sum()) / size() : 0;
     }
 }


Mime
View raw message