LatencyAwareHClientPool extends ConcurrentHClientPool { double score() { double log = 0d; if (latencies.size() > 0) { double probability = p(SENTINEL_COMPARE); log = (-1) * Math.log10(probability); } return log; } LatencyAwareHClientPool(HClientFactory clientFactory, CassandraHost host, CassandraClientMonitor monitor); @Override HClient borrowClient(); @Override void releaseClient(HClient client); void resetIntervel(); void clear(); @Override boolean equals(Object obj);  }
@Test public void testScore() { clientPool.add(120); clientPool.add(121); clientPool.add(122); clientPool.add(123); clientPool.add(124); double score1 = clientPool.score(); clientPool.clear(); clientPool.add(150); clientPool.add(151); clientPool.add(152); clientPool.add(152); clientPool.add(1530); double score2 = clientPool.score(); clientPool.clear(); System.out.println((score2 - score1) / score2); assertTrue("Error... score 2 is bigger than score 1...", (score2 - score1) / score2 > 0); }