Interface IMeasurementConfigurator
Non-generic implementation of IMeasurementConfigurator.
INTERNAL USE ONLY. Must implement IMeasurementConfigurator<T> for NBench ReflectionDiscovery to pick up your metrics.
Namespace: NBench.Sdk
Assembly: NBench.dll
Syntax
public interface IMeasurementConfigurator
Properties
MeasurementType
The type of the underlying MeasurementAttribute configured by this MeasurementConfigurator<T>
Declaration
Type MeasurementType { get; }
Property Value
Type | Description |
---|---|
System.Type |
MeasurementTypeInfo
System.Reflection.TypeInfo extracted from MeasurementType; cached to save on frequent lookups.
Declaration
TypeInfo MeasurementTypeInfo { get; }
Property Value
Type | Description |
---|---|
System.Reflection.TypeInfo |
Methods
GetBenchmarkSettings(MeasurementAttribute)
Produce a IBenchmarkSetting implementation that will be used to tell the Benchmark class which Assertion, if any, it should perform against the MetricCollector data produced for this setting by the GetMetricsProvider(MeasurementAttribute) method on this configurator.
Declaration
IEnumerable<IBenchmarkSetting> GetBenchmarkSettings(MeasurementAttribute instance)
Parameters
Type | Name | Description |
---|---|---|
MeasurementAttribute | instance | An instance of the MeasurementAttribute type that corresponds to this configurator.
Must not be |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IBenchmarkSetting> | A list of IBenchmarkSetting implementation instances built specifically for |
GetMetricsProvider(MeasurementAttribute)
Produce a MetricsCollectorSelector implementation based on the provided MeasurementAttribute instance.
Declaration
MetricsCollectorSelector GetMetricsProvider(MeasurementAttribute instance)
Parameters
Type | Name | Description |
---|---|---|
MeasurementAttribute | instance | An instance of the MeasurementAttribute type that corresponds to this configurator.
Must not be |
Returns
Type | Description |
---|---|
MetricsCollectorSelector | A MetricsCollectorSelector implementation corresponding to this metric. |
Remarks
This object basically tells NBench how to gather the metrics associated with the MeasurementAttribute