cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject svn commit: r964626 - /cassandra/trunk/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java
Date Thu, 15 Jul 2010 22:12:42 GMT
Author: brandonwilliams
Date: Thu Jul 15 22:12:42 2010
New Revision: 964626

URL: http://svn.apache.org/viewvc?rev=964626&view=rev
Log:
simplify AdaptiveLatencyTracker probability calculation.

Modified:
    cassandra/trunk/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java

Modified: cassandra/trunk/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java?rev=964626&r1=964625&r2=964626&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java Thu Jul
15 22:12:42 2010
@@ -221,7 +221,7 @@ class AdaptiveLatencyTracker extends Abs
     {
         double mean = mean();
         double exponent = (-1) * (t) / mean;
-        return 1 - ( 1 - Math.pow( Math.E, exponent) );
+        return Math.pow( Math.E, exponent);
     }
 
     double score()



Mime
View raw message