Class AutoWarmupStoppingCriteria
Automatically choose the best number of iterations during the warmup stage.
Inheritance
AutoWarmupStoppingCriteria
Assembly: BenchmarkDotNet.dll
Syntax
public class AutoWarmupStoppingCriteria : StoppingCriteriaBase, IStoppingCriteria
Constructors
AutoWarmupStoppingCriteria(Int32, Int32, Int32)
The idea of the implementation is simple: if measurements monotonously decrease or increase, the steady state is not achieved;
we should continue the warmup stage. The evaluation method counts "fluctuations"
(3 consecutive measurements A,B,C where (A>B AND B<C) OR (A<B AND B>C)) until the required amount of flotations is observed.
Declaration
public AutoWarmupStoppingCriteria(int minIterationCount, int maxIterationCount, int minFluctuationCount = 4)
Parameters
| Type |
Name |
Description |
| Int32 |
minIterationCount |
The minimum number of iterations.
We are always going to do at least minIterationCount iterations regardless of fluctuations.
|
| Int32 |
maxIterationCount |
The maximum number of iterations.
We are always going to do at most maxIterationCount iterations regardless of fluctuations.
|
| Int32 |
minFluctuationCount |
The required number of fluctuations.
If the required number of fluctuations is achieved but the number of iterations less than minIterationCount,
we need more iterations.
If the required number of fluctuations is not achieved but the number of iterations equal to maxIterationCount,
we should stop the iterations.
|
Methods
Evaluate(IReadOnlyList<Measurement>)
Declaration
public override StoppingResult Evaluate(IReadOnlyList<Measurement> measurements)
Parameters
Returns
Overrides
GetMaxIterationCount()
Declaration
protected override int GetMaxIterationCount()
Returns
Overrides
GetTitle()
Declaration
protected override string GetTitle()
Returns
Overrides
GetWarnings()
Declaration
protected override IEnumerable<string> GetWarnings()
Returns
Overrides
Implements