latency = now - startTime;
lastException = ThriftConverter.ToConnectionPoolException(e).setLatency(latency);
if (e instanceof IsTimeoutException) {
pool.addLatencySample(TimeUnit.NANOSECONDS.convert(cpConfig.getSocketTimeout(), TimeUnit.MILLISECONDS), now);
}
tracer.failure(lastException);
throw lastException;
}
startTime = System.nanoTime(); // We don't want to include
// the set_keyspace in our
// latency calculation