Exemplo n.º 1
0
 private double CalculateForecastedThroughput(TrendModel trend)
 {
     return(trend.Slope * (trend.LastRecordIndex + 5) + trend.Intercept);
 }
Exemplo n.º 2
0
 private async Task ScaleUnstableTrendAsync(string databaseId, string collectionId, TrendModel trend)
 {
     if (_slopeThreshold <= trend.Slope)
     {
         double forecastedThroughput = CalculateForecastedThroughput(trend);
         await Scaler.AdjustThroughputAsync(new ScaleRequest(databaseId, collectionId, (int)forecastedThroughput));
     }
 }