public double durationRatio(State ratioState, long now) {
        return lastState.get().durationRatio(ratioState, now);
    }
Calculate the ratio of time spent in the specified state.

@param ratioState the state for which the ratio is to be calculated; may not be null
@param now        the current time in milliseconds
@return the ratio of time spent in the specified state to the time spent in all states
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/StateTracker.java