Class BenchmarkSettings
Settings for how a particular Benchmark should be run and executed.
Inheritance
System.Object
BenchmarkSettings
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: NBench.dll
Syntax
public class BenchmarkSettings
Constructors
BenchmarkSettings(TestMode, RunMode, Int32, Int32, IEnumerable<IBenchmarkSetting>, IReadOnlyDictionary<MetricName, MetricsCollectorSelector>)
Declaration
public BenchmarkSettings(TestMode testMode, RunMode runMode, int numberOfIterations, int runTime, IEnumerable<IBenchmarkSetting> benchmarkSettings, IReadOnlyDictionary<MetricName, MetricsCollectorSelector> collectors)
Parameters
BenchmarkSettings(TestMode, RunMode, Int32, Int32, IEnumerable<IBenchmarkSetting>, IReadOnlyDictionary<MetricName, MetricsCollectorSelector>, String, String, IBenchmarkTrace, Boolean)
Declaration
public BenchmarkSettings(TestMode testMode, RunMode runMode, int numberOfIterations, int runTimeMilliseconds, IEnumerable<IBenchmarkSetting> benchmarkSettings, IReadOnlyDictionary<MetricName, MetricsCollectorSelector> collectors, string description, string skip, IBenchmarkTrace trace, bool concurrencyModeEnabled = false)
Parameters
Fields
DefaultRuntimeMilliseconds
Declaration
public const long DefaultRuntimeMilliseconds = 1000L
Field Value
Type |
Description |
System.Int64 |
|
Properties
Collectors
The table of collectors we're going to use to gather the metrics configured in Measurements
Declaration
public IReadOnlyDictionary<MetricName, MetricsCollectorSelector> Collectors { get; }
Property Value
ConcurrentMode
Indicates whether concurrency is enabled or not
Declaration
public bool ConcurrentMode { get; }
Property Value
Type |
Description |
System.Boolean |
|
CounterMeasurements
Declaration
public IEnumerable<CounterBenchmarkSetting> CounterMeasurements { get; }
Property Value
Description
A description of this performance benchmark, which will be written into the report.
Declaration
public string Description { get; }
Property Value
Type |
Description |
System.String |
|
DistinctMeasurements
If someone declares two measurements that measure the same thing, but carry different BenchmarkAssertions
then those settings will only show up once on this list, whereas they might appear twice on Measurements
Declaration
public IReadOnlyList<IBenchmarkSetting> DistinctMeasurements { get; }
Property Value
Measurements
All of the configured metrics for this Benchmark
Declaration
public IReadOnlyList<IBenchmarkSetting> Measurements { get; }
Property Value
NumberOfIterations
Number of times this test will be run
Declaration
public int NumberOfIterations { get; }
Property Value
Type |
Description |
System.Int32 |
|
RunMode
The mode in which the performance test will be executed.
Declaration
public RunMode RunMode { get; }
Property Value
RunTime
Timeout the performance test and fail it if
any individual run exceeds this value.
Declaration
public TimeSpan RunTime { get; }
Property Value
Type |
Description |
System.TimeSpan |
|
Skip
If populated, this benchmark will be skipped and the skip reason will be written into the report.
Declaration
public string Skip { get; }
Property Value
Type |
Description |
System.String |
|
SkipWarmups
Indicates whether or not we will skip warmups for our benchmarks
Declaration
public bool SkipWarmups { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
TestMode
Declaration
public TestMode TestMode { get; }
Property Value
TotalTrackedMetrics
Total number of all metrics tracked in this benchmark
Declaration
public int TotalTrackedMetrics { get; }
Property Value
Type |
Description |
System.Int32 |
|
Trace
Declaration
public IBenchmarkTrace Trace { get; }
Property Value
TracingEnabled
Indicates whether tracing is enabled or not
Declaration
public bool TracingEnabled { get; }
Property Value
Type |
Description |
System.Boolean |
|