Table of Contents

Interface IStoppingCriteria

Namespace
BenchmarkDotNet.Engines
Assembly
BenchmarkDotNet.dll

A stopping criteria checks when it's time to terminate iteration in the current stage.

public interface IStoppingCriteria

Properties

MaxIterationCount

The maximum possible count of iterations. Engine needs this value for setting the maximum capacity of the returned list of measurements. The correct capacity helps to avoid infrastructure allocations during benchmarking.

int MaxIterationCount { get; }

Property Value

int
A stopping criteria checks when it's time to terminate iteration in the current stage.

Title

Title which can be used in logs and diagnostics methods

string Title { get; }

Property Value

string
A stopping criteria checks when it's time to terminate iteration in the current stage.

Warnings

An array of user-friendly warnings which notify about incorrect parameters.

IReadOnlyList<string> Warnings { get; }

Property Value

IReadOnlyList<string>
A stopping criteria checks when it's time to terminate iteration in the current stage.

Methods

Evaluate(IReadOnlyList<Measurement>)

Checks do we have enough iterations

StoppingResult Evaluate(IReadOnlyList<Measurement> measurements)

Parameters

measurements IReadOnlyList<Measurement>
A stopping criteria checks when it's time to terminate iteration in the current stage.

Returns

StoppingResult
A stopping criteria checks when it's time to terminate iteration in the current stage.