presto-main/src/main/java/io/prestosql/failuredetector/HeartbeatFailureDetector.java/MonitoringTask/updateState
class MonitoringTask:        private synchronized void updateState()
        {
            // is this an over/under transition?
            if (stats.getRecentFailureRatio() > failureRatioThreshold) {
                successTransitionTimestamp = null;
            }
            else if (successTransitionTimestamp == null) {
                successTransitionTimestamp = System.nanoTime();
            }
        }