docs: double recommendNewRate(double currentRateLimit, List<WriteResult> event, NdBenchMonitor runStats) {
          long currentTime = new Date().getTime();
  
          if (timeOfFirstAutoTuneRequest < 0) {          // race condition here when multiple writers, but can be ignored
              timeOfFirstAutoTuneRequest = currentTime;
          }
  
          // Keep rate at current rate if  calculated write failure ratio meets or exceeds configured threshold,
          // But don't even do this check if a divide by zero error would result from calculating the write
          // failure ratio via the formula:   writesFailures / writeSuccesses
          //
          if (runStats.getWriteSuccess() > 0) {
              double calculatedFailureRatio = runStats.getWriteFailure() / (1.0 * runStats.getWriteSuccess());
              if (calculatedFailureRatio >= autoTuneFailureRatioThreshold) {
                  crossedAllowedFailureThreshold = true;
                  logger.info(
                          "Not considering increase of write rate limit. calculatedFailureRatio={}. threshold={}",
                          calculatedFailureRatio, autoTuneFailureRatioThreshold);
                  return currentRateLimit;
              } else {
                  // by forgetting we crossed threshold and resetting timeOfFirstAutoTuneRequest we allow the
                  // write rate to drop back down to the specified initial value and we get another shot at
                  // trying to step wise increase to the max rate.
                  if (crossedAllowedFailureThreshold) {
                      crossedAllowedFailureThreshold = false;
                      timeOfFirstAutoTuneRequest  = currentTime;
                  }
              }
          }
  
          return rateIncreaser.getRateForGivenClockTime(timeOfFirstAutoTuneRequest, currentTime);
      }