Skip to content

Commit

Permalink
Change the min number of iterations to be Min(10, Count/3)
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyredondo committed Nov 26, 2024
1 parent 8960b7b commit b482a87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/TimeItSharp.Common/ScenarioProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,8 @@ await RunScenarioAsync(repeat.Count, index, scenario, TimeItPhase.ExtraRun, fals

private async Task<List<DataPoint>> RunScenarioAsync(int count, int index, Scenario scenario, TimeItPhase phase, bool checkShouldContinue, Stopwatch stopwatch, CancellationToken cancellationToken)
{
const int minIterations = 10;
var minIterations = count / 3;
minIterations = minIterations < 10 ? 10 : minIterations;
var confidenceLevel = _configuration.ConfidenceLevel;
if (confidenceLevel is <= 0 or >= 1)
{
Expand Down

0 comments on commit b482a87

Please sign in to comment.