public static int GetRecommendedThroughput(int partitionCount, double maximumRequestUnitValue, int minimumThroughput, int maximumThroughput, double growthRate) { if (partitionCount <= 0) { return(minimumThroughput); } if (maximumRequestUnitValue <= minimumThroughput) { maximumRequestUnitValue = minimumThroughput; growthRate = 1.0; } var result = Math.Ceiling(maximumRequestUnitValue / 100 * growthRate) * 100; result = result * partitionCount + BufferThroughput; if (result <= minimumThroughput) { return(minimumThroughput); } else if (result >= maximumThroughput) { return(maximumThroughput); } return(IntegerConverter.ToInteger(result)); }