code: func RateScaledInterval(rate float64, min time.Duration, n int) time.Duration {
  	if rate <= minRate {
  		return min
  	}
  	interval := time.Duration(float64(time.Second) * float64(n) / rate)
  	if interval < min {
  		return min
  	}
  
  	return interval
  }
docs: // RateScaledInterval is used to choose an interval to perform an action in
  // order to target an aggregate number of actions per second across the whole
  // cluster.